fix os detection if/else

This commit is contained in:
Matthew Saunders Brown 2024-06-15 14:55:42 -07:00
parent 77f7ef93eb
commit 2727540a16

View File

@ -100,7 +100,7 @@ chown debian-spamd:mail /etc/spamassassin/sql.cf
if [ $os_codename = jammy ]; then if [ $os_codename = jammy ]; then
sed -i 's|OPTIONS="--create-prefs --max-children 5 --helper-home-dir"|OPTIONS="-x -q -v -u debian-spamd -g mail -m 5"|g' /etc/default/spamassassin sed -i 's|OPTIONS="--create-prefs --max-children 5 --helper-home-dir"|OPTIONS="-x -q -v -u debian-spamd -g mail -m 5"|g' /etc/default/spamassassin
sed -i 's|CRON=0|CRON=1|g' /etc/default/spamassassin sed -i 's|CRON=0|CRON=1|g' /etc/default/spamassassin
elif [ $os_codename != bookworm ]; then elif [ $os_codename = bookworm ]; then
sed -i 's|OPTIONS="--create-prefs --max-children 5 --helper-home-dir"|OPTIONS="-x -q -v -u debian-spamd -g mail -m 5"|g' /etc/default/spamd sed -i 's|OPTIONS="--create-prefs --max-children 5 --helper-home-dir"|OPTIONS="-x -q -v -u debian-spamd -g mail -m 5"|g' /etc/default/spamd
systemctl enable spamassassin-maintenance.timer systemctl enable spamassassin-maintenance.timer
systemctl start spamassassin-maintenance.timer systemctl start spamassassin-maintenance.timer
@ -174,7 +174,7 @@ chown dovecot:mail /usr/local/libexec/vmail-quota-warning.sh
if [ $os_codename = jammy ]; then if [ $os_codename = jammy ]; then
systemctl enable spamassassin systemctl enable spamassassin
systemctl restart spamassassin systemctl restart spamassassin
elif [ $os_codename != bookworm ]; then elif [ $os_codename = bookworm ]; then
systemctl enable spamd systemctl enable spamd
systemctl restart spamd systemctl restart spamd
else else