Commit 50dd2ec2 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Added initscripts directory & Fedora compatible initscript

parent 05584062
#!/bin/bash
#
# chkconfig: - 73 27
# description: Postfix Policy Daemon
#
# processname: cbpolicyd
# source function library
. /etc/init.d/functions
# Get config.
. /etc/sysconfig/network
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
RETVAL=0
start() {
# Check for if we already running
if [ -f /var/lock/subsys/cbpolicyd ]
then
echo "Already running."
return 1
fi
echo -n $"Starting cbpolicyd: "
daemon /usr/sbin/cbpolicyd
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/cbpolicyd
echo
return $RETVAL
}
stop() {
echo -n $"Shutting down cbpolicyd: "
killproc cbpolicyd
RETVAL=$?
rm -f /var/lock/subsys/cbpolicyd
echo
return $RETVAL
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
condrestart)
if [ -f /var/lock/subsys/cbpolicyd ]; then
restart
fi
;;
status)
status cbpolicyd
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
exit 1
esac
exit $RETVAL
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment