mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-26 02:42:58 +02:00
Corrected guardian
build lcd4linux startet integrating collection deamon git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/2.1/trunk@1151 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
48
src/initscripts/init.d/collectd
Normal file
48
src/initscripts/init.d/collectd
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
# Begin $rc_base/init.d/collecd
|
||||
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. $rc_functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
boot_mesg "Starting Collection daemon..."
|
||||
/usr/sbin/collectd -C /etc/collectd.conf
|
||||
evaluate_retval
|
||||
# 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
|
||||
# boot_mesg "Bringing up mbmon daemon..."
|
||||
# /usr/bin/mbmon -P 411 -r
|
||||
# evaluate_retval
|
||||
;;
|
||||
|
||||
stop)
|
||||
# boot_mesg "Stopping mbmon daemon..."
|
||||
# killproc /usr/bin/mbmon
|
||||
# evaluate_retval
|
||||
# boot_mesg "Stopping hddtemp daemon..."
|
||||
# killproc /usr/sbin/hddtemp
|
||||
# evaluate_retval
|
||||
boot_mesg "Stopping Collection daemon..."
|
||||
killproc /usr/sbin/collectd
|
||||
evaluate_retval
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
evaluate_retval
|
||||
;;
|
||||
|
||||
status)
|
||||
statusproc /usr/sbin/collectd
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/collectd
|
||||
@@ -159,6 +159,9 @@ case "${1}" in
|
||||
|
||||
. /var/ipfire/dhcpc/dhcpcd-${DEVICE}.info
|
||||
echo "$IPADDR" > /var/ipfire/red/local-ipaddress
|
||||
grep -v "gateway" /etc/hosts > /tmp/hosts
|
||||
echo "$GATEWAY gateway" >> /tmp/hosts
|
||||
mv /tmp/hosts /etc/hosts
|
||||
echo "$GATEWAY" > /var/ipfire/red/remote-ipaddress
|
||||
else
|
||||
echo ""
|
||||
|
||||
@@ -64,15 +64,15 @@ case "$1" in
|
||||
;;
|
||||
|
||||
stop)
|
||||
|
||||
iptables -t nat -F SQUID
|
||||
if [ -e /var/run/squid.pid ]; then
|
||||
boot_mesg "Stopping Squid Proxy Server..."
|
||||
iptables -t nat -F SQUID
|
||||
squid -k shutdown >/dev/null 2>&1
|
||||
evaluate_retval
|
||||
killproc /usr/bin/squidGuard >/dev/null
|
||||
killproc /usr/sbin/updxlrator >/dev/null
|
||||
killproc /usr/sbin/squid >/dev/null
|
||||
rm -rf /var/run/squid.pid
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user