cd137d5
#!/bin/sh
cd137d5
#
cd137d5
# chkconfig: - 55 45
cd137d5
# description: argus generates network transaction audit records.
cd137d5
# processname: argus
cd137d5
#
cd137d5
cd137d5
# Source function library.
cd137d5
. /etc/init.d/functions
cd137d5
cd137d5
[ -f /usr/sbin/argus ] || exit 0
cd137d5
cd137d5
# Source networking configuration.
cd137d5
. /etc/sysconfig/network
cd137d5
cd137d5
# Check that networking is up.
cd137d5
[ "${NETWORKING}" = "no" ] && exit 0
cd137d5
cd137d5
# Set up argus command-line options
cd137d5
if [ -e /etc/argus.conf ] ; then
cd137d5
	ARGUS_OPTIONS="-d"
cd137d5
else
cd137d5
	ARGUS_OPTIONS="-d -e $HOSTNAME -B 127.0.0.1 -P 561"
cd137d5
fi
cd137d5
cd137d5
RETVAL=0
cd137d5
cd137d5
start() {
cd137d5
	echo -n $"Starting argus: "
cd137d5
	daemon argus $ARGUS_OPTIONS
cd137d5
	RETVAL=$?
cd137d5
	echo
cd137d5
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/argus
cd137d5
	return $RETVAL
cd137d5
}
cd137d5
cd137d5
stop() {
cd137d5
	echo -n $"Shutting down argus: "
cd137d5
	killproc argus
cd137d5
	RETVAL=$?
cd137d5
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/argus
cd137d5
	echo
cd137d5
	return $RETVAL
cd137d5
}
cd137d5
cd137d5
dostatus() {
cd137d5
	status argus
cd137d5
}
cd137d5
cd137d5
restart() {
cd137d5
	stop
cd137d5
	start
cd137d5
}
cd137d5
cd137d5
condrestart() {
cd137d5
	[ -e /var/lock/subsys/argus ] && restart || :
cd137d5
}
cd137d5
cd137d5
# See how we were called.
cd137d5
case "$1" in
cd137d5
  start)
cd137d5
	start
cd137d5
	;;
cd137d5
  stop)
cd137d5
	stop
cd137d5
	;;
cd137d5
  restart|reload)
cd137d5
	restart
cd137d5
	;;
cd137d5
  condrestart)
cd137d5
	condrestart
cd137d5
	;;
cd137d5
  status)
cd137d5
	dostatus
cd137d5
	;;
cd137d5
  *)
cd137d5
	echo "Usage: argus {start|stop|restart|reload|condrestart|status}"
cd137d5
	exit 1
cd137d5
esac
cd137d5
cd137d5
exit $RETVAL