]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/init.d/collectd
2 # Begin $rc_base/init.d/collecd
10 if [ ! -e /etc
/sysconfig
/lm_sensors
]; then
11 boot_mesg
"Searching for Sensors..."
12 "yes" |
/usr
/sbin
/sensors-detect
> /dev
/null
14 if [ ! -e /etc
/sysconfig
/lm_sensors
]; then
15 echo "#No Sensors detected " > /etc
/sysconfig
/lm_sensors
19 boot_mesg
-n "Loading Sensor Modules..."
20 for modul
in `cat /etc/sysconfig/lm_sensors | grep '^MODULE_' | cut -d"=" -s -f2`; do
21 modprobe
$modul > /dev
/null
2>&1;
23 boot_mesg
-n "$SUCCESS$modul$NORMAL ";
25 boot_mesg
-n "$FAILURE$modul$NORMAL ";
31 boot_mesg
"Starting Collection daemon..."
32 /usr
/sbin
/collectd
-C /etc
/collectd.conf
35 # These lines are for furhter implementation of the collectd, atm the temps are
36 # collected by the makegraphs script because of the standby functions
38 # 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
40 # Starting the mbmon in deamon mode to enable sensors reading for collectd
41 # later mbmon will be replaced by lmsensors, if mbmon is not running on your
42 # system, we advise to comment out these lines in order to prevent fail
44 # boot_mesg "Bringing up mbmon daemon..."
45 # /usr/bin/mbmon -P 411 -r
50 # if mbmon is not running on your system, we advise to comment out these lines
51 # in order to prevent fail
52 # boot_mesg "Stopping mbmon daemon..."
53 # killproc /usr/bin/mbmon
55 # boot_mesg "Stopping hddtemp daemon..."
56 # killproc /usr/sbin/hddtemp
58 boot_mesg
"Stopping Collection daemon..."
59 killproc
/usr
/sbin
/collectd
66 # We need to do this that way because mbmon doesn`t clear the port when killed
67 # so the next startup it fails with port allready in use -> donĀ“t restart mbmon
69 boot_mesg
"Stopping Collection daemon..."
70 killproc
/usr
/sbin
/collectd
73 boot_mesg
"Starting Collection daemon..."
74 /usr
/sbin
/collectd
-C /etc
/collectd.conf
79 statusproc
/usr
/sbin
/collectd
83 echo "Usage: $0 {start|stop|restart|status}"
88 # End $rc_base/init.d/collectd