File spreadlogd.init of Package spreadlogd
#! /bin/sh
# Copyright (c) 2009 SUSE Linux Products GmbH, Nuernberg, Germany.
# All rights reserved.
#
# Author: Peter Poeml <poeml@suse.de>
# Please send feedback to http://bugs.opensuse.org/
#
# /etc/init.d/spreadlogd
# and its symbolic link
# /usr/sbin/rcspreadlogd
#
### BEGIN INIT INFO
# Provides: spreadlogd
# Required-Start: $remote_fs $syslog $network spread
# Required-Stop: $remote_fs $syslog $network spread
# Should-Start: ntp named
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Spread Log Daemon
# Description: Logging Daemon for the Spread Toolkit
### END INIT INFO
. /etc/rc.status
# Reset status of this service
rc_reset
SPREAD_BIN=/usr/sbin/spreadlogd
test -x $SPREAD_BIN || {
echo "$SPREAD_BIN not installed";
if [ "$1" = "stop" ] ; then
exit 0
else
exit 5
fi
}
case "$1" in
start)
echo -n "Starting spread logging daemon "
startproc -u spread -g spread $SPREAD_BIN
rc_status -v
;;
stop)
echo -n "Stopping spread logging daemon "
killproc -TERM $SPREAD_BIN
rc_status -v
;;
try-restart|condrestart)
$0 status
if test $? = 0; then
$0 restart
else
rc_reset
fi
rc_status
;;
restart)
$0 stop
$0 start
rc_status
;;
force-reload)
# spread has support for reloading it's config when
# recieving signal 1 (SIGHUP).
echo -n "Reload spread logging daemon "
# killproc -HUP $SPREAD_BIN
# rc_status -v
$0 try-restart
rc_status
;;
reload)
echo -n "Reload spread logging daemon "
killproc -HUP $SPREAD_BIN
rc_status -v
;;
status)
echo -n "Checking for spread logging daemon "
checkproc $SPREAD_BIN
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
exit 1
;;
esac
rc_exit