mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
daily-psk: make qr-code url configurable
This commit is contained in:
parent
cbc547332e
commit
63de875129
|
@ -14,6 +14,7 @@
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:global DailyPskMatchComment;
|
:global DailyPskMatchComment;
|
||||||
|
:global DailyPskQrCodeUrl;
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
|
||||||
:global LogPrintExit2;
|
:global LogPrintExit2;
|
||||||
|
@ -80,7 +81,7 @@ $WaitFullyConnected;
|
||||||
|
|
||||||
:if ($Skip = 0) do={
|
:if ($Skip = 0) do={
|
||||||
:set Seen ($Seen, $Ssid);
|
:set Seen ($Seen, $Ssid);
|
||||||
:local Link ("https://www.eworm.de/cgi-bin/cqrlogo-wifi.cgi" . \
|
:local Link ($DailyPskQrCodeUrl . \
|
||||||
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
|
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
|
||||||
$SendNotification2 ({ origin=$0; \
|
$SendNotification2 ({ origin=$0; \
|
||||||
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
|
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:global DailyPskMatchComment;
|
:global DailyPskMatchComment;
|
||||||
|
:global DailyPskQrCodeUrl;
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
|
||||||
:global LogPrintExit2;
|
:global LogPrintExit2;
|
||||||
|
@ -79,7 +80,7 @@ $WaitFullyConnected;
|
||||||
|
|
||||||
:if ($Skip = 0) do={
|
:if ($Skip = 0) do={
|
||||||
:set Seen ($Seen, $Ssid);
|
:set Seen ($Seen, $Ssid);
|
||||||
:local Link ("https://www.eworm.de/cgi-bin/cqrlogo-wifi.cgi" . \
|
:local Link ($DailyPskQrCodeUrl . \
|
||||||
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
|
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
|
||||||
$SendNotification2 ({ origin=$0; \
|
$SendNotification2 ({ origin=$0; \
|
||||||
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
|
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:global DailyPskMatchComment;
|
:global DailyPskMatchComment;
|
||||||
|
:global DailyPskQrCodeUrl;
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
|
||||||
:global LogPrintExit2;
|
:global LogPrintExit2;
|
||||||
|
@ -87,7 +88,7 @@ $WaitFullyConnected;
|
||||||
|
|
||||||
:if ($Skip = 0) do={
|
:if ($Skip = 0) do={
|
||||||
:set Seen ($Seen, $Ssid);
|
:set Seen ($Seen, $Ssid);
|
||||||
:local Link ("https://www.eworm.de/cgi-bin/cqrlogo-wifi.cgi" . \
|
:local Link ($DailyPskQrCodeUrl . \
|
||||||
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
|
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
|
||||||
$SendNotification2 ({ origin=$0; \
|
$SendNotification2 ({ origin=$0; \
|
||||||
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
|
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
|
||||||
|
|
|
@ -121,6 +121,7 @@
|
||||||
# Access-list entries matching this comment are updated
|
# Access-list entries matching this comment are updated
|
||||||
# with daily pseudo-random PSK.
|
# with daily pseudo-random PSK.
|
||||||
:global DailyPskMatchComment "Daily PSK";
|
:global DailyPskMatchComment "Daily PSK";
|
||||||
|
:global DailyPskQrCodeUrl "https://www.eworm.de/cgi-bin/cqrlogo-wifi.cgi";
|
||||||
:global DailyPskSecrets {
|
:global DailyPskSecrets {
|
||||||
{ "Abusive"; "Aggressive"; "Bored"; "Chemical"; "Cold";
|
{ "Abusive"; "Aggressive"; "Bored"; "Chemical"; "Cold";
|
||||||
"Cruel"; "Curved"; "Delightful"; "Discreet"; "Elite";
|
"Cruel"; "Curved"; "Delightful"; "Discreet"; "Elite";
|
||||||
|
|
|
@ -100,6 +100,7 @@
|
||||||
89="Made the warning time for 'check-certificates' configurable.";
|
89="Made the warning time for 'check-certificates' configurable.";
|
||||||
90="Chat with your router! Introduced 'telegram-chat' to chat via Telegram bot and send commands to your router.";
|
90="Chat with your router! Introduced 'telegram-chat' to chat via Telegram bot and send commands to your router.";
|
||||||
91="Dropped check for CAP in 'check-routeros-update' to solve issues with wifiwave2 package.";
|
91="Dropped check for CAP in 'check-routeros-update' to solve issues with wifiwave2 package.";
|
||||||
|
92="Made qr-code url configurable for 'daily-psk'.";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Migration steps to be applied on script updates
|
# Migration steps to be applied on script updates
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
:local 0 "global-functions";
|
:local 0 "global-functions";
|
||||||
|
|
||||||
# expected configuration version
|
# expected configuration version
|
||||||
:global ExpectedConfigVersion 91;
|
:global ExpectedConfigVersion 92;
|
||||||
|
|
||||||
# global variables not to be changed by user
|
# global variables not to be changed by user
|
||||||
:global GlobalFunctionsReady false;
|
:global GlobalFunctionsReady false;
|
||||||
|
|
Loading…
Reference in a new issue