#! /bin/sh
#
# chkconfig: 2345 35 65
# description: Courier Socks server
#
#

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

prefix="/usr"
exec_prefix="/usr"
sysconfdir="/etc"
sbindir="/usr/sbin"
bindir="/usr/bin"
libexecdir="/usr/lib64/courier-sox"
datadir="/usr/share"

case "$1" in
start)
        cd /
        # Start daemons.
        touch /var/lock/subsys/courier-sox

        echo -n "Starting the Courier Socks server: "

	$sbindir/sockd start
	echo "sockd"
        ;;
stop)
        echo -n "Stopping the Courier Socks server: "

	$sbindir/sockd stop
	echo "sockd"
	rm -f /var/lock/subsys/courier-sox
        ;;
restart)
	$0 stop
	$0 start
        ;;
reload|force-reload)
        echo -n "Reloading the Courier Socks server: "
	$sbindir/sockd restart
	echo "sockd"
        ;;
status)
        status sockd
	exit $?
	;;
*)
        msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
	exit 3
esac
exit 0
