8 POSTLICYD=/usr/sbin/postlicyd
9 PIDFILE=/var/run/postlicyd/pid
10 CONF=/etc/pfixtools/postlicyd.conf
12 [ -z $1 ] && die "usage $0 (start|stop|reload|check-conf)"
14 mkdir -p `dirname "$PIDFILE"` || die "Can't create $PIDFILE"
23 echo "Starting postlicyd..."
24 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $POSTLICYD --text > /dev/null || die "Already running"
25 do_checkconf || die "Invalid configuration"
26 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $POSTLICYD -- -p "$PIDFILE" "$CONF" || die "Failed"
31 echo "Stopping postlicyd..."
32 start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name "postlicyd"
35 1) die "Nothing to stop" ;;
36 2) die "Cannot stop process" ;;
41 echo "Reloading postlicyd..."
42 do_checkconf || die "Invalid configuration"
43 start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name postlicyd
47 do_checkconf || die "Invalid configuration"
51 die "usage $0 (start|stop|reload|check-conf)"