[enh] remove failure in the script

This commit is contained in:
Julien Malik 2016-03-08 14:16:46 +01:00
parent 64949cea38
commit 83c881f5b4

View file

@ -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 \