]> git.pld-linux.org Git - packages/spamassassin.git/commitdiff
- use numeric -eq test ('=' is for strings), stop traversing after first match
authorTomasz Pala <gotar@pld-linux.org>
Mon, 29 Mar 2010 11:43:56 +0000 (11:43 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    spamassassin-spamd.init -> 1.13

spamassassin-spamd.init

index 1d7af475d118bed145b2e28ffa9326ef4ff5b431..19dc131483e5d6156ce454b78b6fb5ac22148dd1 100644 (file)
@@ -36,7 +36,7 @@ start() {
        fi
 
        # Check if database is installed.
-       if [ "$(find /var/lib/spamassassin/ -name '*.cf' | wc -l)" = 0 ]; then
+       if [ "$(find /var/lib/spamassassin/ -name '*.cf' | head -n1 | wc -l)" -eq 0 ]; then
                show 'Spamassassin database not found. Run sa-update first.'; fail
                return 1
        fi
@@ -74,10 +74,10 @@ condrestart() {
 # See how we were called.
 case "$1" in
   start)
-       start
+       start
        ;;
   stop)
-       stop
+       stop
        ;;
   restart)
        stop
This page took 0.040184 seconds and 4 git commands to generate.