aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-02-16 16:01:36 +0100
committerGravatar Christian Hesse <mail@eworm.de>2021-02-16 16:01:36 +0100
commite7c2a7745a7aa6b252091c144a7bd66055b6434e (patch)
treebb34e85e5dffe7b679f5fc087c1d14bc754a079e
parent0c2143298d1d4908429e9d5d04aa6b055e88dc13 (diff)
daily-psk: drop support for attaching QR-Code
The notification contains the link. Should be sufficient, no?
-rw-r--r--daily-psk.capsman16
-rw-r--r--daily-psk.local16
-rw-r--r--daily-psk.template16
3 files changed, 6 insertions, 42 deletions
diff --git a/daily-psk.capsman b/daily-psk.capsman
index d7c4ad7..10b3403 100644
--- a/daily-psk.capsman
+++ b/daily-psk.capsman
@@ -75,26 +75,14 @@ $WaitFullyConnected;
:if ($Skip = 0) do={
:set Seen ($Seen, $Ssid);
-
- :local Url ("https://www.eworm.de/cgi-bin/cqrlogo-wifi.cgi" . \
+ :local Link ("https://www.eworm.de/cgi-bin/cqrlogo-wifi.cgi" . \
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
- :local Attach "qrcode-daily.png";
-
- :do {
- / tool fetch check-certificate=yes-without-crl \
- $Url dst-path=$Attach;
- $WaitForFile $Attach;
- } on-error={
- :set Attach "";
- }
-
$SendNotification ([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid) \
("This is the daily PSK on " . $Identity . ":\n\n" . \
"SSID: " . $Ssid . "\n" . \
"PSK: " . $NewPsk . "\n" . \
"Date: " . $Date . "\n\n" . \
- "A client device specific rule must not exist!") \
- $Url $Attach;
+ "A client device specific rule must not exist!") $Link;
}
}
}
diff --git a/daily-psk.local b/daily-psk.local
index 1add2e9..ec03c1a 100644
--- a/daily-psk.local
+++ b/daily-psk.local
@@ -75,26 +75,14 @@ $WaitFullyConnected;
:if ($Skip = 0) do={
:set Seen ($Seen, $Ssid);
-
- :local Url ("https://www.eworm.de/cgi-bin/cqrlogo-wifi.cgi" . \
+ :local Link ("https://www.eworm.de/cgi-bin/cqrlogo-wifi.cgi" . \
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
- :local Attach "qrcode-daily.png";
-
- :do {
- / tool fetch check-certificate=yes-without-crl \
- $Url dst-path=$Attach;
- $WaitForFile $Attach;
- } on-error={
- :set Attach "";
- }
-
$SendNotification ([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid) \
("This is the daily PSK on " . $Identity . ":\n\n" . \
"SSID: " . $Ssid . "\n" . \
"PSK: " . $NewPsk . "\n" . \
"Date: " . $Date . "\n\n" . \
- "A client device specific rule must not exist!") \
- $Url $Attach;
+ "A client device specific rule must not exist!") $Link;
}
}
}
diff --git a/daily-psk.template b/daily-psk.template
index 7f8cd75..590b1ea 100644
--- a/daily-psk.template
+++ b/daily-psk.template
@@ -81,26 +81,14 @@ $WaitFullyConnected;
:if ($Skip = 0) do={
:set Seen ($Seen, $Ssid);
-
- :local Url ("https://www.eworm.de/cgi-bin/cqrlogo-wifi.cgi" . \
+ :local Link ("https://www.eworm.de/cgi-bin/cqrlogo-wifi.cgi" . \
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
- :local Attach "qrcode-daily.png";
-
- :do {
- / tool fetch check-certificate=yes-without-crl \
- $Url dst-path=$Attach;
- $WaitForFile $Attach;
- } on-error={
- :set Attach "";
- }
-
$SendNotification ([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid) \
("This is the daily PSK on " . $Identity . ":\n\n" . \
"SSID: " . $Ssid . "\n" . \
"PSK: " . $NewPsk . "\n" . \
"Date: " . $Date . "\n\n" . \
- "A client device specific rule must not exist!") \
- $Url $Attach;
+ "A client device specific rule must not exist!") $Link;
}
}
}