#!/bin/sh
#
# oidentd		This shell script takes care of starting and stopping oidentd.
#
# chkconfig:    2345 80 30
# description:  oidentd is a TCP/IP IDENT protocol server 
#		
# processname:  pop-before-smtpd
# config:	
# pidfile:

#Servicename
SERVICE=pop-before-smtp

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

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

if [ ${NETWORKING} = "no" ]
then
	exit 0
fi

[ -x /usr/sbin/$SERVICE ] || exit 0

# See how we were called.
case "$1" in
  start)
	gprintf "Starting %s: " "$SERVICE"
	daemon /usr/sbin/$SERVICE &
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$SERVICE
	;;
  stop)
	gprintf "Stopping %s: " "$SERVICE"
	killproc $SERVICE
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$SERVICE
	;;
  status)
	status $SERVICE
	RETVAL=$?
	;;
  restart|reload)
	$0 stop
	$0 start
	RETVAL=$?
	;;
  *)
	gprintf "Usage: %s {start|stop|status|restart|reload}\n" "$SERVICE"
	exit 1
esac

exit $RETVAL

