#!/bin/sh
#
# Starts the gident daemon
#

# $PATH to go
PATH=/sbin:/bin:/usr/sbin:/usr/bin
          
# where the gidendt-daemon is
GIDENTD=/usr/sbin/gidentd
                  
# options for running gidentd
OPTIONS="-p 113 -l /var/log/gidentd.log"

if [ -x "/usr/sbin/gidentd" ]; then
case "$1" in
        start)
                echo -n "Starting ident daemon:"
                echo -n " gidentd"
                start-stop-daemon --start --quiet --exec ${GIDENTD} -- ${OPTIONS}
                echo "."
                ;;
        
	stop)
                echo -n "Stopping ident daemon:"
                echo -n " gidentd"
                start-stop-daemon --stop --quiet --oknodo --exec ${GIDENTD}
                echo "."  
                ;;
        
	restart|force-reload)
                echo -n "Restarting ident daemon:"
                echo -n " gidentd"
                start-stop-daemon --stop --quiet --oknodo --exec ${GIDENTD}
                sleep 2
                start-stop-daemon --start --quiet --exec ${GIDENTD} -- ${OPTIONS}
                echo "."
                ;;
        *)
                echo "Usage: $0 {start|stop|restart|reload|force-reload}"
                exit 1
                ;;
esac
fi

exit 0

