aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-02-24 10:48:41 +0100
committerGravatar Christian Hesse <mail@eworm.de>2020-02-24 10:48:41 +0100
commit4984b4fd511e3f4f0352d30c37a312ed6884dcb3 (patch)
tree928de8594c73c4b96bd981e84712b3760af9a370
parente11ddeaf8cca4669bde5449df9d388314cffa548 (diff)
daily-psk-schedule: use $MailServerIsUp
-rw-r--r--daily-psk-schedule4
1 files changed, 3 insertions, 1 deletions
diff --git a/daily-psk-schedule b/daily-psk-schedule
index c9be0bf..6c542a2 100644
--- a/daily-psk-schedule
+++ b/daily-psk-schedule
@@ -4,12 +4,14 @@
#
# schedule daily-psk on startup
+:global MailServerIsUp;
+
: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 ([ / tool netwatch get [ find where comment=[ / tool e-mail get address ] ] status ] != "up") do={
+ :if ($MailServerIsUp = false) do={
:log warning "Mail server is not up.";
:error "Warning: See log for details.";
}