#!/bin/sh
#
# /etc/rc.d/rc.example
#
# Start/stop/restart the example daemon.
#
# To make the example run automatically at boot, make this
# file executable:  chmod 755 /etc/rc.d/rc.example
#

# Start example
example_start() {
  if [ -x /usr/local/sbin/example ]; then
    /usr/local/sbin/example
  fi
}

# Stop example:
example_stop() {
  killall example
}

# Restart example:
example_restart() {
  example_stop
  sleep 1
  example_start
}

case "$1" in
'start')
  example_start
  ;;
'stop')
  example_stop
  ;;
'restart')
  example_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac




###################################################
# remove this section before use!!  since it's not commented
# below you will most likely see terrible errors if you do not
# remove it!!
#
# just add a section in rc.inet2 or rc.local or some
# other file that calls things near the end of boot up, 
# that will call this rc script.  make is just like this:



# Start the example:
if [ -x /etc/rc.d/rc.example ]; then
  /etc/rc.d/rc.example start
fi



# end section to remove
###################################################

Close Window