aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--backup-cloud.rsc2
-rw-r--r--backup-email.rsc2
-rw-r--r--backup-partition.rsc3
-rw-r--r--backup-upload.rsc2
-rw-r--r--certificate-renew-issued.rsc3
-rw-r--r--check-certificates.rsc2
-rw-r--r--check-lte-firmware-upgrade.rsc4
-rw-r--r--daily-psk.capsman.rsc2
-rw-r--r--daily-psk.local.rsc2
-rw-r--r--daily-psk.template.rsc2
-rw-r--r--dhcp-lease-comment.capsman.rsc3
-rw-r--r--dhcp-lease-comment.local.rsc3
-rw-r--r--dhcp-lease-comment.template.rsc3
-rw-r--r--firmware-upgrade-reboot.rsc3
-rw-r--r--gps-track.rsc3
-rw-r--r--hotspot-to-wpa.rsc3
-rw-r--r--ipsec-to-dns.rsc3
-rw-r--r--ipv6-update.rsc3
-rw-r--r--ospf-to-leds.rsc3
-rw-r--r--update-gre-address.rsc3
-rw-r--r--update-tunnelbroker.rsc3
21 files changed, 57 insertions, 0 deletions
diff --git a/backup-cloud.rsc b/backup-cloud.rsc
index b6f6025..859892b 100644
--- a/backup-cloud.rsc
+++ b/backup-cloud.rsc
@@ -21,10 +21,12 @@
:global LogPrintExit2;
:global RandomDelay;
:global ScriptFromTerminal;
+:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global WaitFullyConnected;
+$ScriptLock $0;
$WaitFullyConnected;
:if ([ $ScriptFromTerminal $0 ] = false && $BackupRandomDelay > 0) do={
diff --git a/backup-email.rsc b/backup-email.rsc
index e8837a0..5eb4fcc 100644
--- a/backup-email.rsc
+++ b/backup-email.rsc
@@ -27,6 +27,7 @@
:global MkDir;
:global RandomDelay;
:global ScriptFromTerminal;
+:global ScriptLock;
:global SendEMail2;
:global SymbolForNotification;
:global WaitForFile;
@@ -41,6 +42,7 @@
$LogPrintExit2 error $0 ("Configured to send neither backup nor config export.") true;
}
+$ScriptLock $0;
$WaitFullyConnected;
:if ([ $ScriptFromTerminal $0 ] = false && $BackupRandomDelay > 0) do={
diff --git a/backup-partition.rsc b/backup-partition.rsc
index 824cb7e..364101c 100644
--- a/backup-partition.rsc
+++ b/backup-partition.rsc
@@ -13,6 +13,9 @@
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:global LogPrintExit2;
+:global ScriptLock;
+
+$ScriptLock $0;
:if ([ :len [ /partitions/find ] ] < 2) do={
$LogPrintExit2 error $0 ("Device does not have a fallback partition.") true;
diff --git a/backup-upload.rsc b/backup-upload.rsc
index 9fb35d8..1ec61a5 100644
--- a/backup-upload.rsc
+++ b/backup-upload.rsc
@@ -31,6 +31,7 @@
:global MkDir;
:global RandomDelay;
:global ScriptFromTerminal;
+:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global WaitForFile;
@@ -41,6 +42,7 @@
$LogPrintExit2 error $0 ("Configured to send neither backup nor config export.") true;
}
+$ScriptLock $0;
$WaitFullyConnected;
:if ([ $ScriptFromTerminal $0 ] = false && $BackupRandomDelay > 0) do={
diff --git a/certificate-renew-issued.rsc b/certificate-renew-issued.rsc
index c297b15..2b18a76 100644
--- a/certificate-renew-issued.rsc
+++ b/certificate-renew-issued.rsc
@@ -14,6 +14,9 @@
:global LogPrintExit2;
:global MkDir;
+:global ScriptLock;
+
+$ScriptLock $0;
:foreach Cert in=[ /certificate/find where issued expires-after<3w ] do={
:local CertVal [ /certificate/get $Cert ];
diff --git a/check-certificates.rsc b/check-certificates.rsc
index a3b0a8f..db9007a 100644
--- a/check-certificates.rsc
+++ b/check-certificates.rsc
@@ -20,6 +20,7 @@
:global IfThenElse;
:global LogPrintExit2;
:global ParseKeyValueStore;
+:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global UrlEncode;
@@ -98,6 +99,7 @@
[ $FormatLine "Expires in" [ $IfThenElse (($CertVal->"expired") = true) "expired" [ $FormatExpire ($CertVal->"expires-after") ] ] ]);
}
+$ScriptLock $0;
$WaitFullyConnected;
:foreach Cert in=[ /certificate/find where !revoked !ca !scep-url expires-after<$CertRenewTime ] do={
diff --git a/check-lte-firmware-upgrade.rsc b/check-lte-firmware-upgrade.rsc
index 92ebe51..a2aec01 100644
--- a/check-lte-firmware-upgrade.rsc
+++ b/check-lte-firmware-upgrade.rsc
@@ -12,6 +12,10 @@
:global SentLteFirmwareUpgradeNotification;
+:global ScriptLock;
+
+$ScriptLock $0;
+
:if ([ :typeof $SentLteFirmwareUpgradeNotification ] != "array") do={
:global SentLteFirmwareUpgradeNotification ({});
}
diff --git a/daily-psk.capsman.rsc b/daily-psk.capsman.rsc
index a24d761..0b5e666 100644
--- a/daily-psk.capsman.rsc
+++ b/daily-psk.capsman.rsc
@@ -19,12 +19,14 @@
:global FormatLine;
:global LogPrintExit2;
+:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global UrlEncode;
:global WaitForFile;
:global WaitFullyConnected;
+$ScriptLock $0;
$WaitFullyConnected;
# return pseudo-random string for PSK
diff --git a/daily-psk.local.rsc b/daily-psk.local.rsc
index 5e6e30f..df6d962 100644
--- a/daily-psk.local.rsc
+++ b/daily-psk.local.rsc
@@ -19,12 +19,14 @@
:global FormatLine;
:global LogPrintExit2;
+:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global UrlEncode;
:global WaitForFile;
:global WaitFullyConnected;
+$ScriptLock $0;
$WaitFullyConnected;
# return pseudo-random string for PSK
diff --git a/daily-psk.template.rsc b/daily-psk.template.rsc
index 966a407..777f6c0 100644
--- a/daily-psk.template.rsc
+++ b/daily-psk.template.rsc
@@ -20,12 +20,14 @@
:global FormatLine;
:global LogPrintExit2;
+:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global UrlEncode;
:global WaitForFile;
:global WaitFullyConnected;
+$ScriptLock $0;
$WaitFullyConnected;
# return pseudo-random string for PSK
diff --git a/dhcp-lease-comment.capsman.rsc b/dhcp-lease-comment.capsman.rsc
index d3b2dc5..89d2c4e 100644
--- a/dhcp-lease-comment.capsman.rsc
+++ b/dhcp-lease-comment.capsman.rsc
@@ -15,6 +15,9 @@
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:global LogPrintExit2;
+:global ScriptLock;
+
+$ScriptLock $0;
:foreach Lease in=[ /ip/dhcp-server/lease/find where dynamic=yes status=bound ] do={
:local LeaseVal [ /ip/dhcp-server/lease/get $Lease ];
diff --git a/dhcp-lease-comment.local.rsc b/dhcp-lease-comment.local.rsc
index 0d1b2c0..11e92cc 100644
--- a/dhcp-lease-comment.local.rsc
+++ b/dhcp-lease-comment.local.rsc
@@ -15,6 +15,9 @@
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:global LogPrintExit2;
+:global ScriptLock;
+
+$ScriptLock $0;
:foreach Lease in=[ /ip/dhcp-server/lease/find where dynamic=yes status=bound ] do={
:local LeaseVal [ /ip/dhcp-server/lease/get $Lease ];
diff --git a/dhcp-lease-comment.template.rsc b/dhcp-lease-comment.template.rsc
index 28581f4..be28cfd 100644
--- a/dhcp-lease-comment.template.rsc
+++ b/dhcp-lease-comment.template.rsc
@@ -16,6 +16,9 @@
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:global LogPrintExit2;
+:global ScriptLock;
+
+$ScriptLock $0;
:foreach Lease in=[ /ip/dhcp-server/lease/find where dynamic=yes status=bound ] do={
:local LeaseVal [ /ip/dhcp-server/lease/get $Lease ];
diff --git a/firmware-upgrade-reboot.rsc b/firmware-upgrade-reboot.rsc
index cc45c38..ec2babc 100644
--- a/firmware-upgrade-reboot.rsc
+++ b/firmware-upgrade-reboot.rsc
@@ -11,8 +11,11 @@
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:global LogPrintExit2;
+:global ScriptLock;
:global VersionToNum;
+$ScriptLock $0;
+
:local RouterBoard [ /system/routerboard/get ];
:if ($RouterBoard->"current-firmware" = $RouterBoard->"upgrade-firmware") do={
$LogPrintExit2 info $0 ("Current and upgrade firmware match with version " . \
diff --git a/gps-track.rsc b/gps-track.rsc
index d0d1232..c601e04 100644
--- a/gps-track.rsc
+++ b/gps-track.rsc
@@ -14,6 +14,9 @@
:global Identity;
:global LogPrintExit2;
+:global ScriptLock;
+
+$ScriptLock $0;
:local CoordinateFormat [ /system/gps/get coordinate-format ];
:local Gps [ /system/gps/monitor once as-value ];
diff --git a/hotspot-to-wpa.rsc b/hotspot-to-wpa.rsc
index e2de112..d7aeb65 100644
--- a/hotspot-to-wpa.rsc
+++ b/hotspot-to-wpa.rsc
@@ -13,6 +13,9 @@
:global EitherOr;
:global LogPrintExit2;
:global ParseKeyValueStore;
+:global ScriptLock;
+
+$ScriptLock $0;
:local MacAddress $"mac-address";
:local UserName $username;
diff --git a/ipsec-to-dns.rsc b/ipsec-to-dns.rsc
index a476e74..d961865 100644
--- a/ipsec-to-dns.rsc
+++ b/ipsec-to-dns.rsc
@@ -19,6 +19,9 @@
:global EscapeForRegEx;
:global IfThenElse;
:global LogPrintExit2;
+:global ScriptLock;
+
+$ScriptLock $0;
:local Zone \
([ $IfThenElse ($PrefixInZone = true) "ipsec." ] . \
diff --git a/ipv6-update.rsc b/ipv6-update.rsc
index 2838feb..7e1d34f 100644
--- a/ipv6-update.rsc
+++ b/ipv6-update.rsc
@@ -14,6 +14,9 @@
:global LogPrintExit2;
:global ParseKeyValueStore;
+:global ScriptLock;
+
+$ScriptLock $0;
:if ([ :typeof $PdPrefix ] = "nothing") do={
$LogPrintExit2 error $0 ("This script is supposed to run from ipv6 dhcp-client.") true;
diff --git a/ospf-to-leds.rsc b/ospf-to-leds.rsc
index 12ec820..2dc8448 100644
--- a/ospf-to-leds.rsc
+++ b/ospf-to-leds.rsc
@@ -12,6 +12,9 @@
:global LogPrintExit2;
:global ParseKeyValueStore;
+:global ScriptLock;
+
+$ScriptLock $0;
:foreach Instance in=[ /routing/ospf/instance/find where comment~"^ospf-to-leds," ] do={
:local InstanceVal [ /routing/ospf/instance/get $Instance ];
diff --git a/update-gre-address.rsc b/update-gre-address.rsc
index 2958055..e38839c 100644
--- a/update-gre-address.rsc
+++ b/update-gre-address.rsc
@@ -13,6 +13,9 @@
:global CharacterReplace;
:global LogPrintExit2;
+:global ScriptLock;
+
+$ScriptLock $0;
/interface/gre/set remote-address=0.0.0.0 disabled=yes [ find where !running !disabled ];
diff --git a/update-tunnelbroker.rsc b/update-tunnelbroker.rsc
index 84d7430..a1d5e5e 100644
--- a/update-tunnelbroker.rsc
+++ b/update-tunnelbroker.rsc
@@ -16,6 +16,9 @@
:global CertificateAvailable;
:global LogPrintExit2;
:global ParseKeyValueStore;
+:global ScriptLock;
+
+$ScriptLock $0;
:if ([ $CertificateAvailable "Starfield Secure Certificate Authority - G2" ] = false) do={
$LogPrintExit2 error $0 ("Downloading required certificate failed.") true;