]>
Commit | Line | Data |
---|---|---|
a332b303 CS |
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 | # evaluate_retval | |
17 | ;; | |
18 | ||
19 | stop) | |
20 | # boot_mesg "Stopping mbmon daemon..." | |
21 | # killproc /usr/bin/mbmon | |
22 | # evaluate_retval | |
23 | # boot_mesg "Stopping hddtemp daemon..." | |
24 | # killproc /usr/sbin/hddtemp | |
25 | # evaluate_retval | |
26 | boot_mesg "Stopping Collection daemon..." | |
27 | killproc /usr/sbin/collectd | |
28 | evaluate_retval | |
29 | ;; | |
30 | ||
31 | restart) | |
32 | $0 stop | |
33 | sleep 1 | |
34 | $0 start | |
35 | evaluate_retval | |
36 | ;; | |
37 | ||
38 | status) | |
39 | statusproc /usr/sbin/collectd | |
40 | ;; | |
41 | ||
42 | *) | |
43 | echo "Usage: $0 {start|stop|restart|status}" | |
44 | exit 1 | |
45 | ;; | |
46 | esac | |
47 | ||
48 | # End $rc_base/init.d/collectd |