Ubuntu fix when spamassassin isn't in startup list

Patch is ported from Debian installer (old and tested).
Fix for https://bugs.vestacp.com/issues/461
This commit is contained in:
dpeca 2016-12-27 17:21:00 +01:00 committed by GitHub
commit 61a12e4cd9

View file

@ -1081,6 +1081,9 @@ if [ "$spamd" = 'yes' ]; then
sed -i "s/ENABLED=0/ENABLED=1/" /etc/default/spamassassin
service spamassassin start
check_result $? "spamassassin start failed"
if [[ $(systemctl list-unit-files | grep spamassassin) =~ "disabled" ]]; then
systemctl enable spamassassin
fi
fi