Commit c3e7769e authored by Leigh Stoller's avatar Leigh Stoller

Startup script for report_daemon on subbosses.

parent ed3f8c58
#!/bin/sh
# PROVIDE: reportboot_daemon
# REQUIRE: DAEMON ntpd
# BEFORE: testbed
# KEYWORD: shutdown
. /etc/rc.subr
bindir=@prefix@/sbin
if [ ! -x $bindir/reportboot_daemon ]; then
echo "*** reportboot.sh: $bindir/reportboot_daemon not installed"
exit 1
fi
if [ ! -x $bindir/reportboot ]; then
echo "*** reportboot.sh: $bindir/reportboot not installed"
exit 1
fi
case "$1" in
start|faststart|quietstart|onestart|forcestart)
;;
restart|fastrestart|quietrestart|onerestart|forcerestart)
if [ -f /var/run/reportboot_daemon.pid ]; then
kill `cat /var/run/reportboot_daemon.pid` >/dev/null 2>&1
rm -f /var/run/reportboot_daemon.pid
fi
;;
stop|faststop|quietstop|onestop|forcestop)
echo -n ' reportboot_daemon'
if [ -f /var/run/reportboot_daemon.pid ]; then
kill `cat /var/run/reportboot_daemon.pid` >/dev/null 2>&1
rm -f /var/run/reportboot_daemon.pid
fi
exit 0
;;
*)
echo "Usage: $0 {start|stop|restart}" >&2
exit 1
;;
esac
echo -n " reportboot_daemon"
rm -f /var/run/reportboot_daemon.pid
if [ -x @prefix@/sbin/daemon_wrapper ]; then
@prefix@/sbin/daemon_wrapper -i 30 -l @prefix@/log/reportboot_daemon.log \
-p /var/run/reportboot_daemon.pid @prefix@/sbin/reportboot_daemon -f
else
@prefix@/sbin/reportboot_daemon
fi
exit $?
......@@ -40,7 +40,8 @@ include $(OBJDIR)/Makeconf
RC_SCRIPTS = 2.mysql-server.sh 3.mfrisbeed.sh 3.testbed.sh \
2.dhcpd.sh 1.mysql-client.sh 2.tbdbcheck.sh
SUBBOSS_SCRIPTS = 2.dhcpd.sh 3.mfrisbeed-subboss.sh arplock.sh
SUBBOSS_SCRIPTS = 2.dhcpd.sh 3.mfrisbeed-subboss.sh arplock.sh \
3.reportboot-subboss.sh
OPS_SCRIPTS = 3.and.sh 1.mysql-client.sh 1.mysql-server.sh arplock-opsfs.sh
ifeq ($(TBMAINSITE),1)
OPS_SCRIPTS += cluster-status.sh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment