Here's our policyd (cluebringer) init script... hope this helps, Jim.
It's set in chkconfig to kick off in run levels, 2,3,4, and 5.
--Tobias

#!/bin/bash
#
# Init file for Policy Daemon
#
# chkconfig: 2345 55 25
# description: Postfix Policy Daemon
#
# processname: policyd

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

RETVAL=0
PROG="/usr/local/policyd-2.0/cbpolicyd"
CONF="/usr/local/policyd-2.0/cluebringer.conf"

start()
{
        echo -n $"Starting $PROG:"
        #initlog -c "$PROG -c $CONF" && success || failure
        daemon "$PROG -c $CONF"
        RETVAL=$?
        [ "$RETVAL" = 0 ] && touch /var/lock/subsys/cbpolicyd
        echo
}

stop()
{
        echo -n $"Stopping $PROG:"
        killproc cbpolicyd
        RETVAL=$?
        [ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/cbpolicyd
        echo
}

restart()
{
        stop
        start
}

case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        restart)
                restart
                ;;
        *)
                echo $"Usage: $0 {start|stop|restart}"
                RETVAL=1
esac
exit $RETVAL
_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users

Reply via email to