#!/bin/sh
# $Owl: Owl/packages/sysklogd/syslog.init,v 1.6 2005/11/16 13:31:52 solar Exp $
#
# chkconfig: 2345 30 99
# description: \
#	syslogd and klogd provide the facility used by many daemons and \
#	the kernel to log messages to various system log files or other \
#	destinations.

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

OWL_STARTUP_ENABLE=1

# Source config
if [ -f /etc/sysconfig/syslog ]; then
	. /etc/sysconfig/syslog
else
	SYSLOGD_OPTIONS='-m 0'
	KLOGD_OPTIONS=''
fi

# See how we were called.
case "$1" in
start)
	daemon syslogd -u syslogd $SYSLOGD_OPTIONS && \
		daemon klogd -u klogd -j /var/empty $KLOGD_OPTIONS
	;;
stop)
	killproc klogd
	rm -f /var/run/klogd.pid
	killproc syslogd
	rm -f /var/run/syslogd.pid
	;;
status)
	status syslogd
	status klogd
	;;
restart)
	$0 stop
	$0 start
	;;
reload)
	killproc syslogd -HUP
	;;
*)
	echo "Usage: syslog {start|stop|status|restart|reload}"
	exit 1
esac

exit $?
