File policyd-weight.init of Package policyd-weight
#! /bin/sh
# Copyright (c) 2008 Heinlein Prof. Linux Support GmbH
#
# Author: Peer Heinlein
#
#
### BEGIN INIT INFO
# Provides: policyd-weight
# Required-Start: $syslog $local_fs $network $named $time
# Should-Start: sendmail $remote_fs
# Required-Stop: $syslog $local_fs
# Should-Stop: $time sendmail $remote_fs
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start policyd-weight
### END INIT INFO
POLW_BIN=/usr/sbin/policyd-weight
test -x $POLW_BIN || exit 5
# First reset status of this service
. /etc/rc.status
rc_reset
case "$1" in
start)
echo -n "Starting policyd-weight-daemon: "
$POLW_BIN start
rc_status -v
;;
stop)
echo -n "Shutting down policyd-weight-daemon (still running the cache): "
$POLW_BIN stop
rc_status -v
;;
fullstop)
echo -n "Shutting down cache- and policyd-weight-daemon: "
$POLW_BIN -k stop
rc_status -v
;;
try-restart)
$0 status >/dev/null && $0 restart
rc_status
;;
reload)
killproc -HUP "$POLW_BIN"
rc_status -v
;;
restart)
$0 stop
$0 start
rc_status
;;
status)
echo -n "Checking for service policyd-weight-daemon: "
checkproc policyd-weight
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|fullstop|status|try-restart|restart}"
exit 1
esac
# Inform the caller not only verbosely and set an exit status.
rc_exit