#!/bin/sh
#
# chkconfig: - 20 80
# description: This script takes care of starting \
#              and stopping ss5
#

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

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -f /usr/sbin/ss5 ] || exit 0

# See how we were called.
case "$1" in
  start)
        # Start daemon.
        echo -n "Starting ss5... "
        /usr/sbin/ss5 -t 
        touch /var/lock/subsys/ss5
	echo "done"
        ;;
  stop)
        # Stop daemon.
        echo "Shutting down ss5... "
	killproc ss5
        rm -f /var/lock/subsys/ss5
	echo "done"
        ;;
  reload)
        # Reload configuration
        echo -n "Reloading ss5... "
	killproc ss5 -1
	;;
  restart)
        # Restart daemon
        echo -n "Restarting ss5... "
	$0 stop
	$0 start
	;;
  status)
	status ss5
	;;
  *)
        echo "Usage: ss5 {start|stop|status|restart|reload}"
        exit 1
	;;
esac

exit 0
