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

%config
    inn_enable="yes"
    inn_nntpsend_enable="no"

%start -p 200 -u @l_musr@
    opServiceEnabled inn || exit 0
    @l_prefix@/libexec/inn/rc.news

%stop -p 200 -u @l_musr@
    opServiceEnabled inn || exit 0
    @l_prefix@/libexec/inn/rc.news stop

%restart -u @l_musr@
    opServiceEnabled inn || exit 0
    @l_prefix@/libexec/inn/rc.news stop
    sleep 2
    @l_prefix@/libexec/inn/rc.news

%reload -u root
    opServiceEnabled inn || exit 0
    @l_prefix@/bin/ctlinnd reload all rc.inn:reload

%daily -u @l_musr@
    opServiceEnabled inn || exit 0
    @l_prefix@/libexec/inn/news.daily expireover lowmark delayrm

%quarterly -u root
    opServiceEnabled inn || exit 0
    opServiceEnabled inn_nntpsend && @l_prefix@/bin/nntpsend || true

