]> git.ipfire.org Git - ipfire-2.x.git/blob - src/initscripts/init.d/collectd
removed fail's if mbmon cannot start
[ipfire-2.x.git] / src / initscripts / init.d / collectd
1 #!/bin/sh
2 # Begin $rc_base/init.d/collecd
3
4
5 . /etc/sysconfig/rc
6 . $rc_functions
7
8 case "$1" in
9 start)
10 boot_mesg "Starting Collection daemon..."
11 /usr/sbin/collectd -C /etc/collectd.conf
12 evaluate_retval
13 # for disk in `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`; do boot_mesg "Bringing up hddtemp daemon for $disk ..."; /usr/sbin/hddtemp $disk -d -l localhost; evaluate_retval; done
14 boot_mesg "Bringing up mbmon daemon..."
15 /usr/bin/mbmon -P 411 -r
16 if [ ${?} = 0 ]; then
17 echo_ok;
18 fi
19 ;;
20
21 stop)
22 # boot_mesg "Stopping mbmon daemon..."
23 # killproc /usr/bin/mbmon
24 # if [ ${?} = 0 ]; then
25 # echo_ok;
26 # fi
27 # boot_mesg "Stopping hddtemp daemon..."
28 # killproc /usr/sbin/hddtemp
29 # evaluate_retval
30 boot_mesg "Stopping Collection daemon..."
31 killproc /usr/sbin/collectd
32 evaluate_retval
33 ;;
34
35 restart)
36 $0 stop
37 sleep 1
38 $0 start
39 evaluate_retval
40 ;;
41
42 status)
43 statusproc /usr/sbin/collectd
44 ;;
45
46 *)
47 echo "Usage: $0 {start|stop|restart|status}"
48 exit 1
49 ;;
50 esac
51
52 # End $rc_base/init.d/collectd