diff options
author | Philippe Chaintreuil <gentoo_bugs_peep@parallaxshift.com> | 2023-11-24 13:19:30 -0500 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2024-01-27 10:48:55 +0200 |
commit | 8cbc788fa83b225e7fd72f38b248a50a1e21e616 (patch) | |
tree | ea8a3595ca85eddc6750b66356754bddbe95ed0d /mail-filter | |
parent | media-sound/gigedit: bump to 1.2.1 + eapi8 (diff) | |
download | gentoo-8cbc788fa83b225e7fd72f38b248a50a1e21e616.tar.gz gentoo-8cbc788fa83b225e7fd72f38b248a50a1e21e616.tar.bz2 gentoo-8cbc788fa83b225e7fd72f38b248a50a1e21e616.zip |
mail-filter/spamassassin: Fix script output when amavisd is disabled
Because bash scripts exit with the status of the last command. If systemctl
is installed but amavisd is not active the script returns with the value 4.
This causes cron to send an email.
Switching from "&&" to an if fixes this.
Signed-off-by: Philippe Chaintreuil <gentoo_bugs_peep@parallaxshift.com>
Closes: https://bugs.gentoo.org/681872
Closes: https://github.com/gentoo/gentoo/pull/33969
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'mail-filter')
-rw-r--r-- | mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron b/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron index edac381b5de4..37c04f5b6ad8 100644 --- a/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron +++ b/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron @@ -35,7 +35,8 @@ if (( $? == 0 || $? == 3 )); then # check is to keep systemctl from outputting warnings if # amavisd is not installed (bug #681872). systemctl try-restart spamassassin - systemctl is-active --quiet amavisd \ - && systemctl try-reload-or-restart amavisd + if ( systemctl is-active --quiet amavisd ); then + systemctl try-reload-or-restart amavisd + fi fi fi |