From 125f37615b1e42275fd1766a2cccfba8e8f94b3e Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 24 Feb 2020 12:17:42 +0100 Subject: drop script 'daily-psk-schedule' We have some useful functions that can replace the functionality. Just add a schedule like this: add name=daily-psk-startup on-event=":delay 1s; :global WaitTimeSync; \$WaitTimeSync; / system script run daily-psk.local;" start-time=startup --- daily-psk-schedule | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 daily-psk-schedule diff --git a/daily-psk-schedule b/daily-psk-schedule deleted file mode 100644 index 7e745e1..0000000 --- a/daily-psk-schedule +++ /dev/null @@ -1,28 +0,0 @@ -#!rsc -# RouterOS script: daily-psk-schedule -# Copyright (c) 2013-2020 Christian Hesse -# -# schedule daily-psk on startup - -:global MailServerIsUp; -:global TimeIsSync; - -:local Scheduler [ / system scheduler find where name="daily-psk-schedule" ]; - -:if ([ / system scheduler get $Scheduler interval ] = 0s) do={ - / system scheduler set interval=15s $Scheduler; -} else={ - :if ($MailServerIsUp = false) do={ - :log warning "Mail server is not up."; - :error "Warning: See log for details."; - } - - :if ($TimeIsSync = false) do={ - :log warning "Time is not yet synchronized."; - :error "Warning: See log for details."; - } - - / system script run [ find where name~"^daily-psk\\.(capsman|local)\$" ]; - - / system scheduler set interval=0s $Scheduler; -} -- cgit v1.2.3-70-g09d2