#!/bin/sh

# chkconfig: 345 27 10
# description: testing

start () {
        echo "bruce script has started" >> /opt/start.txt
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && touch /var/lock/subsys/bruce
        return $RETVAL
}

stop () {
        echo "bruce script has stoppped" >> /opt/stop.txt
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && rm -rf /var/lock/subsys/bruce
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        stop
        start
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart}"
esac