michael@556: #!@l_prefix@/bin/openpkg rc michael@556: ## michael@556: ## rc.bind -- Run-Commands michael@556: ## michael@556: michael@556: %config michael@556: bind_enable="$openpkg_rc_def" michael@556: bind_flags="" michael@556: bind_log_prolog="true" michael@556: bind_log_epilog="true" michael@556: bind_log_numfiles="10" michael@556: bind_log_minsize="1M" michael@556: bind_log_complevel="9" michael@556: bind_stats_prolog="true" michael@556: bind_stats_epilog="true" michael@556: bind_stats_numfiles="10" michael@556: bind_stats_minsize="1M" michael@556: bind_stats_complevel="9" michael@556: michael@556: %status -u @l_susr@ -o michael@556: bind_usable="no" michael@556: bind_active="no" michael@556: @l_prefix@/sbin/named-checkconf >/dev/null && bind_usable="yes" michael@556: @l_prefix@/sbin/rndc status >/dev/null 2>&1 && bind_active="yes" michael@556: echo "bind_enable=\"$bind_enable\"" michael@556: echo "bind_usable=\"$bind_usable\"" michael@556: echo "bind_active=\"$bind_active\"" michael@556: michael@556: %start -p 100 -u @l_susr@ michael@556: rcService bind enable yes || exit 0 michael@556: rcService bind active yes && exit 0 michael@556: @l_prefix@/sbin/named -u @l_rusr@ ${bind_flags} michael@556: michael@556: %stop -p 900 -u @l_susr@ michael@556: rcService bind enable yes || exit 0 michael@556: rcService bind active no && exit 0 michael@556: @l_prefix@/sbin/rndc stop michael@556: sleep 2 michael@556: michael@556: %restart -p 100 -u @l_susr@ michael@556: rcService bind enable yes || exit 0 michael@556: rcService bind active no && exit 0 michael@556: rc bind stop start michael@556: michael@556: %reload -p 100 -u @l_susr@ michael@556: rcService bind enable yes || exit 0 michael@556: rcService bind active no && exit 0 michael@556: @l_prefix@/sbin/rndc reload michael@556: michael@556: %daily -u @l_susr@ michael@556: rcService bind enable yes || exit 0 michael@556: shtool rotate -f \ michael@556: -n $bind_stats_numfiles -s $bind_stats_minsize -d \ michael@556: -z $bind_stats_complevel -m 644 -o @l_rusr@ -g @l_rgrp@ \ michael@556: -P "$bind_stats_prolog" \ michael@556: -E "$bind_stats_epilog" \ michael@556: @l_prefix@/var/bind/named.stats michael@556: shtool rotate -f \ michael@556: -n $bind_log_numfiles -s $bind_log_minsize -d \ michael@556: -z $bind_log_complevel -m 644 -o @l_rusr@ -g @l_rgrp@ \ michael@556: -P "$bind_log_prolog" \ michael@556: -E "$bind_log_epilog; rc bind reload" \ michael@556: @l_prefix@/var/bind/named.log michael@556: