]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/initscripts/init.d/collectd
Fix type /etc/init.d/ntp (booot).
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / collectd
index cf02acbe3e2ab2ccffe5c8e6d2c428e3694c2e17..74ff3fdc82e84722bc3d9988b74aefa96edc7dcf 100644 (file)
@@ -59,7 +59,7 @@ case "$1" in
                fi
 
                # Enable sensors plugin if sensors found
-               if [ $( sensors 2>&1 | grep "No sensors found!" | wc -l ) == "1" ]; then
+               if [ "$( sensors 2>&1 | grep 'No sensors found!' | wc -l )" == "1" ]; then
                        sed -i -e "s|^LoadPlugin sensors|#LoadPlugin sensors|g" /etc/collectd.conf
                else
                        sed -i -e "s|^#LoadPlugin sensors|LoadPlugin sensors|g" /etc/collectd.conf
@@ -84,13 +84,13 @@ case "$1" in
                evaluate_retval
                ;;
        stop)
+               boot_mesg "Stopping Collection daemon..."
+               killproc /usr/sbin/collectd
+               evaluate_retval
                # Save the ramdisk at manual stop but not at shutdown
                if [ "$(basename $0)" == "collectd" ]; then
                    /etc/init.d/tmpfs backup
                fi
-               boot_mesg "Stopping Collection daemon..."
-               killproc /usr/sbin/collectd
-               evaluate_retval
                ;;
        restart)
                ${0} stop