#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc
##
##  rc.bind -- Run-Commands for Portsentry Daemon
##

%config
    portsentry_enable="yes"

%start -p 200 -u root
    opServiceEnabled portsentry || exit 0
    @l_prefix@/sbin/portsentry -tcp
    @l_prefix@/sbin/portsentry -udp

%stop -p 200 -u root
    opServiceEnabled portsentry || exit 0
    @l_prefix@/sbin/rpmtool signal TERM portsentry

%restart -u root
    opServiceEnabled portsentry || exit 0
    @l_prefix@/sbin/rpmtool signal TERM portsentry
    sleep 2
    @l_prefix@/sbin/portsentry -tcp
    @l_prefix@/sbin/portsentry -udp

