#!/bin/sh
# 
# description: helps IRC on a masqueraded network
#
# oidentd can be used in two ways
# Case A: Directly on a workstation directly.
# - You need to make /etc/oidentd.conf.
#   Please read "man oidentd.conf" and "man oidentd.conf" 
#  
# Case B: Running on a gateway to masquerades many workstations 
# - You need to add /etc/oidentd_masq.conf
# - Enable masquerade mode (-m), see OPT below
#
# ps: don't forget to open your firewall for this !
# 
# (c) Eko M. Budi for Vector Linux
# License : GNU GPL

# Include the functions declared in the /etc/rc.d/functions file
source /etc/rc.d/functions

# path to binary
ROOT="/usr/sbin"
# name of binary to run
APP="oidentd"
#runtime options, add -m for masquerade mode
#OPT="-m"

#server name & description
SERVER="OIDENTD IRC-helper server"

case "$1" in
        start)
                echon "Starting $SERVER............"
		loadproc $ROOT/$APP $OPT
                ;;
        reload)
                echon "Reloading $SERVER..........."
                checkloadproc $ROOT/$APP $OPT
                ;;
        stop)
                echon "Stopping $SERVER............"
		killproc $ROOT/$APP
                ;;
        restart)
                $0 stop
                /bin/sleep 1
                $0 start
                ;;
        status)
                statusproc $ROOT/$APP
                ;;
        *)
                echo "Usage: $0 {start|stop|reload|restart|status}"
                exit 1
        ;;

esac

# End /etc/init.d/
