1999/06/24  Accomodating with chkconfig

[0] Init Script


#!/bin/sh
#
# foobar:       This shell script takes care of starting and stopping
#               foobar.
#
# chkconfig:   2345 89 11
# description: This shell script takes care of starting and stopping
#              foobar.
#

# Source function library.
. /etc/rc.d/init.d/functions

[ -x /usr/bin/foobar ] || exit 0

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        echo -n "Starting foobar: "
        daemon foobar
        echo
        touch /var/lock/subsys/foobar
        ;;
  stop)
        # Stop daemons by invoking "killproc foobar", or
	# if there is a special kill command, use "action" as
        action "Shutting down foobar: " foobarkill
	rm -f /var/lock/subsys/foobar
        ;;
  *)
        echo "Usage: foobar {start|stop}"
        exit 1
esac

exit 0

[1] Addition or Deletion from /etc/rc.d/rc*.d/*foobar

# chkconfig --add foobar

# chkconfig --del foobar
