]> git.pld-linux.org Git - packages/spamassassin.git/commitdiff
- if spamassassin database is not installed, spamd dies with error message
authorpawelz <pawelz@pld-linux.org>
Sat, 27 Mar 2010 20:04:02 +0000 (20:04 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  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

spamassassin-spamd.init

index 6c65bbad6ae05df9aeffe2df046f5c71bbe0cd64..2c7dddbdcbe4145a32f75add2e802f2a3fd1a14d 100644 (file)
@@ -35,6 +35,12 @@ start() {
                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=$?
This page took 0.063465 seconds and 4 git commands to generate.