that is not very helpful. It may confuse users. This commit adds check for
SA database. It test fails init script won't try to start SA, but it'll
display error message with information how to install SA satabase.
Changed files:
spamassassin-spamd.init -> 1.9
return
fi
+ # Check if database is installed.
+ if [ $(find /var/lib/spamassassin/ -name '*.cf' | wc -l) -gt 0 ]; then
+ show 'Spamassassin database not found. Run sa-update first.' && fail
+ return 1
+ fi
+
msg_starting "SpamAssassin"
daemon /usr/bin/spamd $SPAMD_OPTS
RETVAL=$?