3 # bb Big Brother System and Network Monitor
6 # description: Big Brother is System and Network Monitoring system
9 # Source function library
10 . /etc/rc.d/init.d/functions
13 . /etc/sysconfig/network
16 [ -f /etc/sysconfig/bb ] && . /etc/sysconfig/bb
18 # Check that networking is up.
19 if is_no "${NETWORKING}"; then
20 # nls "ERROR: Networking is down. %s can't be run." <service>
21 msg_Network_Down httpd
25 # See how we were called.
28 # Check if the service is already running?
29 if [ ! -f /var/lock/subsys/bb ]; then
31 su - bb -c '/usr/bin/setsid /usr/lib/bb/runbb.sh start' </dev/null >/dev/null 2>&1
33 if [ "$RETVAL" = "0" ]; then
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bb
40 msg_Already_Running bb
46 if [ -f /var/lock/subsys/bb ]; then
48 su - bb -c '/usr/lib/bb/runbb.sh stop' >/dev/null 2>&1
49 if [ "$?" = "0" ]; then
54 rm -f /var/lock/subsys/bb >/dev/null 2>&1
65 msg_Usage "$0 {start|stop|restart}"