From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/
Date: Sat, 27 Jan 2024 08:50:08 +0000 (UTC) [thread overview]
Message-ID: <1706345335.8cbc788fa83b225e7fd72f38b248a50a1e21e616.juippis@gentoo> (raw)
commit: 8cbc788fa83b225e7fd72f38b248a50a1e21e616
Author: Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com>
AuthorDate: Fri Nov 24 18:19:30 2023 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Jan 27 08:48:55 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cbc788f
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 <AT> parallaxshift.com>
Closes: https://bugs.gentoo.org/681872
Closes: https://github.com/gentoo/gentoo/pull/33969
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron | 5 +++--
1 file 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
next reply other threads:[~2024-01-27 8:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-27 8:50 Joonas Niilola [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-06-29 4:40 [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/ Sam James
2020-03-16 11:48 Joonas Niilola
2019-01-21 22:51 Patrice Clement
2018-09-04 22:32 Patrice Clement
2017-11-28 20:01 Michael Orlitzky
2017-09-06 17:27 Michael Orlitzky
2017-08-20 14:50 Michael Orlitzky
2016-06-07 0:44 Michael Orlitzky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1706345335.8cbc788fa83b225e7fd72f38b248a50a1e21e616.juippis@gentoo \
--to=juippis@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox