diff options
author | Christian Hesse <mail@eworm.de> | 2018-09-13 13:16:14 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2018-09-13 13:16:14 +0200 |
commit | 374c9c09ba93e5cefde9cf21799e5ae65720bcd7 (patch) | |
tree | 46674844694ee70f3c2804d871cb489f5fa34150 | |
parent | dcf795464b29236fa58ad23fe996e4f77480525b (diff) |
script-updates: check and warn about policies
-rw-r--r-- | script-updates | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/script-updates b/script-updates index c872cd2..c8efc1f 100644 --- a/script-updates +++ b/script-updates @@ -12,6 +12,7 @@ :foreach script in=[ / system script find ] do={ :local ignore 0; :local scriptname [ / system script get $script name ]; + :local scriptpolicy [ / system script get $script policy ]; :local scriptfile [ / file find where name=("script-updates/" . $scriptname) ]; :local sourcenew; :if ([ :len $scriptfile ] > 0) do={ @@ -19,6 +20,15 @@ / file remove $scriptfile; } + :foreach scheduler in=[ / system scheduler find where on-event=$scriptname ] do={ + :local schedulername [ / system scheduler get $scheduler name ]; + :local schedulerpolicy [ / system scheduler get $scheduler policy ]; + :if ($scriptpolicy != schedulerpolicy) do={ + :log warning ("Policies differ for script " . $scriptname . \ + " and its scheduler " . $schedulername . "!"); + } + } + :if ([ :len $sourcenew ] = 0 && $"script-updates-fetch" = true) do={ :foreach "ignore-loop" in=$"script-updates-ignore" do={ :if ($"ignore-loop" = $scriptname) do={ :set ignore 1; } |