Debian fix for spamassassin when it's not in startup list

Fix for https://bugs.vestacp.com/issues/346
This commit is contained in:
dpeca 2016-09-08 03:49:20 +02:00 committed by GitHub
parent 2057b3ee95
commit e1af40e232

View file

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