#!@l_prefix@/bin/openpkg rc
##
##  rc.snmpdx -- Run-Commands
##

%config
    snmpdx_enable="$openpkg_rc_def"
    snmpdx_log_file="@l_prefix@/var/snmpdx/snmpdx.log"
    snmpdx_log_prolog="true"
    snmpdx_log_epilog="true"
    snmpdx_log_numfiles="10"
    snmpdx_log_minsize="1M"
    snmpdx_log_complevel="9"

%daily -u @l_susr@
    rcService snmpdx enable yes || exit 0
    shtool rotate -f \
        -n ${snmpdx_log_numfiles} -s ${snmpdx_log_minsize} -d \
        -z ${snmpdx_log_complevel} -o @l_susr@ -g @l_mgrp@ -m 644 \
        -P "${snmpdx_log_prolog}" \
        -E "${snmpdx_log_epilog}; rc snmp restart" \
        ${snmpdx_log_file}

