First shutdown collectd and then save ramdisk at collectd stop
authorArne Fitzenreiter <arne_f@ipfire.org>
Tue, 12 May 2009 17:30:33 +0000 (19:30 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Tue, 12 May 2009 17:30:33 +0000 (19:30 +0200)
src/initscripts/init.d/collectd

index cf02acbe3e2ab2ccffe5c8e6d2c428e3694c2e17..a63aea05c828362e79b80c59767e84a2c28e5108 100644 (file)
@@ -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