diff options
author | Christian Hesse <mail@eworm.de> | 2021-06-30 21:10:58 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2021-06-30 21:16:17 +0200 |
commit | e13e3cfe34b2ac0c1ec859d05ba2d0df8adc2e0f (patch) | |
tree | 0d42857e042f877546abf2fe275dddddedf4ae99 /global-functions | |
parent | 301ad4b3e570a362dd8f7b7fe4448d7638803509 (diff) |
global-functions: $ScriptLock: check if script exists
Diffstat (limited to 'global-functions')
-rw-r--r-- | global-functions | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/global-functions b/global-functions index d15d176..7b68701 100644 --- a/global-functions +++ b/global-functions @@ -910,6 +910,10 @@ :global IfThenElse; :global LogPrintExit2; + :if ([ :len [ / system script find where name=$Script ] ] = 0) do={ + $LogPrintExit2 error $0 ("A script named '" . $Script . "' does not exist!") true; + } + :if ([ :len [ / system script job find where script=$Script ] ] > 1) do={ $LogPrintExit2 info $0 ("Script " . $Script . " started more than once... Aborting.") \ [ $IfThenElse ($DoReturn = true) false true ]; |