]> git.proxmox.com Git - pmg-api.git/commitdiff
pmg-daily: avoid short-circuting update of local channels
authorStoiko Ivanov <s.ivanov@proxmox.com>
Wed, 13 Jul 2022 09:09:35 +0000 (11:09 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 13 Jul 2022 09:13:07 +0000 (11:13 +0200)
by using ||= directly with the actual update call, it does not get
run, if `sa-update` already returned that a restart is needed.

reported in our community forum:
https://forum.proxmox.com/threads/.112112/

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/bin/pmg-daily

index b06515cc3ad24a7c2d3c97ac3b1b457b6d8596ad..d67a88ac8aad0df8226e0c3a2e9793497af64036 100755 (executable)
@@ -85,7 +85,7 @@ if (system('sa-update') == 0) {
 }
 
 eval {
-    $restart_filter ||= PMG::Utils::update_local_spamassassin_channels(0);
+    $restart_filter = 1 if PMG::Utils::update_local_spamassassin_channels(0);
 };
 syslog('err', "$@") if $@;