fi
fi
- if [ ! -e $RRDLOG.bak/ ]; then
- mkdir $RRDLOG.bak/
- fi
-
- /etc/init.d/collectd restore
-
boot_mesg -n "Loading Sensor Modules..."
for modul in `cat /etc/sysconfig/lm_sensors | grep '^MODULE_' | cut -d"=" -s -f2`; do
modprobe $modul > /dev/null 2>&1;
evaluate_retval
;;
stop)
- /etc/init.d/collectd backup
+ # 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
sleep 1
${0} start
;;
- backup)
- boot_mesg "Save rrd files from ramd..."
- cp -pR $RRDLOG/* $RRDLOG.bak/
- evaluate_retval
- ;;
- restore)
- boot_mesg "Copying rrd files to ramd..."
- cp -pR $RRDLOG.bak/* $RRDLOG/
- ;;
status)
statusproc /usr/sbin/collectd
;;