mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-03 17:54:41 +02:00
global: give script or function name in log messages
This commit is contained in:
parent
b0e52aa2d1
commit
f46db91845
46 changed files with 262 additions and 212 deletions
|
@ -9,13 +9,14 @@
|
|||
#
|
||||
# !! Do not edit this file, it is generated from template!
|
||||
|
||||
:local 0 "daily-psk.capsman";
|
||||
:global GlobalFunctionsReady;
|
||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||
|
||||
:global DailyPskMatchComment;
|
||||
:global Identity;
|
||||
|
||||
:global LogPrintExit;
|
||||
:global LogPrintExit2;
|
||||
:global SendNotification;
|
||||
:global SymbolForNotification;
|
||||
:global UrlEncode;
|
||||
|
@ -65,13 +66,13 @@ $WaitFullyConnected;
|
|||
:local Skip 0;
|
||||
|
||||
:if ($NewPsk != $OldPsk) do={
|
||||
$LogPrintExit info ("Updating daily PSK for " . $Ssid . " to " . $NewPsk . " (was " . $OldPsk . ")") false;
|
||||
$LogPrintExit2 info $0 ("Updating daily PSK for " . $Ssid . " to " . $NewPsk . " (was " . $OldPsk . ")") false;
|
||||
/ caps-man access-list set $AccList private-passphrase=$NewPsk;
|
||||
|
||||
:if ([ :len [ / caps-man interface find where configuration=$Configuration ] ] > 0) do={
|
||||
:foreach SeenSsid in=$Seen do={
|
||||
:if ($SeenSsid = $Ssid) do={
|
||||
$LogPrintExit debug ("Already sent a mail for SSID " . $Ssid . ", skipping.") false;
|
||||
$LogPrintExit2 debug $0 ("Already sent a mail for SSID " . $Ssid . ", skipping.") false;
|
||||
:set Skip 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue