Code

collectd-core.collectd.init.d: Use the exit codes specified by LSB in status.
[pkg-collectd.git] / debian / collectd-core.collectd.init.d
index 5771380d0594c1d96adb0c04cda8b4e74846fa03..65d1f8d0beb7afa2aacc0e881978dfd168819ae8 100755 (executable)
@@ -142,10 +142,16 @@ d_status() {
                        echo "collectd ($PID) is running."
                        exit 0
                else
+                       if test -f "$_PIDFILE"; then
+                               echo "collectd is stopped but PID file exists."
+                               exit 1
+                       fi
                        echo "collectd is stopped."
+                       exit 3
                fi
        fi
-       exit 1
+       echo "status of collectd unknown."
+       exit 4
 }
 
 case "$1" in