From 83c881f5b4ffb74ba45682fc8111c45268ad3abf Mon Sep 17 00:00:00 2001 From: Julien Malik Date: Tue, 8 Mar 2016 14:16:46 +0100 Subject: [PATCH] [enh] remove failure in the script --- data/hooks/conf_regen/22-email-legacy | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/data/hooks/conf_regen/22-email-legacy b/data/hooks/conf_regen/22-email-legacy index d17a6dd11..5d67b4638 100644 --- a/data/hooks/conf_regen/22-email-legacy +++ b/data/hooks/conf_regen/22-email-legacy @@ -16,12 +16,15 @@ if [[ "$1" == "True" ]]; then # Remove previous email services systemctl is-enabled spamassassin > /dev/null 2>&1 \ - && { sudo systemctl disable spamassassin || true ; } + && { sudo systemctl disable spamassassin || true ; } \ + || true systemctl is-active spamassassin > /dev/null \ - && { sudo systemctl stop spamassassin || true ; } - sudo rm -f /etc/cron.daily/spamassassin + && { sudo systemctl stop spamassassin || true ; } \ + || true + sudo rm -f /etc/cron.daily/spamassassin || true sudo yunohost service status spamassassin > /dev/null 2>&1 \ - && { sudo yunohost service remove spamassassin || true ; } + && { sudo yunohost service remove spamassassin || true ; } \ + || true # 'systemctl is-enabled' does not work for service with no systemd unit file sudo ls /etc/rc2.d/S??amavis > /dev/null 2>&1 \