]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/initscripts/init.d/collectd
Disabled mbmon in collectd initskript/config
[people/teissler/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 #
14 # These lines are for furhter implementation of the collectd, atm the temps are
15 # collected by the makegraphs script because of the standby functions
16 #
17 # 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
18 #
19 # Starting the mbmon in deamon mode to enable sensors reading for collectd
20 # later mbmon will be replaced by lmsensors, if mbmon is not running on your
21 # system, we advise to comment out these lines in order to prevent fail
22 #
23 # boot_mesg "Bringing up mbmon daemon..."
24 # /usr/bin/mbmon -P 411 -r
25 # evaluate_retval
26
27 ;;
28
29 stop)
30 # if mbmon is not running on your system, we advise to comment out these lines
31 # in order to prevent fail
32 boot_mesg "Stopping mbmon daemon..."
33 killproc /usr/bin/mbmon
34 evaluate_retval
35 # boot_mesg "Stopping hddtemp daemon..."
36 # killproc /usr/sbin/hddtemp
37 # evaluate_retval
38 boot_mesg "Stopping Collection daemon..."
39 killproc /usr/sbin/collectd
40 evaluate_retval
41 ;;
42
43 restart)
44
45 #
46 # We need to do this that way because mbmon doesn`t clear the port when killed
47 # so the next startup it fails with port allready in use -> donĀ“t restart mbmon
48 #
49 boot_mesg "Stopping Collection daemon..."
50 killproc /usr/sbin/collectd
51 evaluate_retval
52 sleep 1
53 boot_mesg "Starting Collection daemon..."
54 /usr/sbin/collectd -C /etc/collectd.conf
55 evaluate_retval
56 ;;
57
58 status)
59 statusproc /usr/sbin/collectd
60 ;;
61
62 *)
63 echo "Usage: $0 {start|stop|restart|status}"
64 exit 1
65 ;;
66 esac
67
68 # End $rc_base/init.d/collectd