aboutsummaryrefslogtreecommitdiffstats
path: root/check-routeros-update
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-12-07 15:40:14 +0100
committerGravatar Christian Hesse <mail@eworm.de>2021-12-07 15:40:14 +0100
commit8f8130775f9dc2590e3408621c8a5ceb80b76d76 (patch)
tree18b3c2f3d8856f0b4762575b0e6b6b46c1fd0e51 /check-routeros-update
parentdab04fd63e61618a8ef4996e3322d60f37f1d911 (diff)
check-routeros-update: lock against multiple invocation
Diffstat (limited to 'check-routeros-update')
-rw-r--r--check-routeros-update3
1 files changed, 3 insertions, 0 deletions
diff --git a/check-routeros-update b/check-routeros-update
index d21a7d0..b82df24 100644
--- a/check-routeros-update
+++ b/check-routeros-update
@@ -20,6 +20,7 @@
:global DeviceInfo;
:global LogPrintExit2;
:global ScriptFromTerminal;
+:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global VersionToNum;
@@ -34,6 +35,8 @@
:error "Waiting for system to reboot.";
}
+$ScriptLock $0;
+
$WaitFullyConnected;
:if ([ :len [ / system package find where name="wireless" disabled=no ] ] > 0) do={