You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.4 KiB
52 lines
1.4 KiB
#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc |
|
## |
|
## rc.bind8 -- Run-Commands |
|
## |
|
|
|
%config |
|
bind8_enable="$openpkg_rc_def" |
|
bind8_log_prolog="true" |
|
bind8_log_epilog="true" |
|
bind8_log_numfiles="5" |
|
bind8_log_minsize="512K" |
|
bind8_log_complevel="9" |
|
|
|
%status -u @l_susr@ -o |
|
bind8_usable="unknown" |
|
bind8_active="no" |
|
@l_prefix@/sbin/ndc status >/dev/null 2>&1 && bind8_active="yes" |
|
echo "bind8_enable=\"$bind8_enable\"" |
|
echo "bind8_usable=\"$bind8_usable\"" |
|
echo "bind8_active=\"$bind8_active\"" |
|
|
|
%start -p 100 -u @l_susr@ |
|
rcService bind8 enable yes || exit 0 |
|
rcService bind8 active yes && exit 0 |
|
@l_prefix@/sbin/ndc start |
|
|
|
%stop -p 100 -u @l_susr@ |
|
rcService bind8 enable yes || exit 0 |
|
rcService bind8 active no && exit 0 |
|
@l_prefix@/sbin/ndc stop |
|
|
|
%restart -p 100 -u @l_susr@ |
|
rcService bind8 enable yes || exit 0 |
|
rcService bind8 active no && exit 0 |
|
@l_prefix@/sbin/ndc restart |
|
|
|
%reload -p 100 -u @l_susr@ |
|
rcService bind8 enable yes || exit 0 |
|
rcService bind8 active no && exit 0 |
|
@l_prefix@/sbin/ndc reload |
|
|
|
%daily -u @l_susr@ |
|
rcService bind8 enable yes || exit 0 |
|
|
|
# rotate logfile |
|
shtool rotate -f \ |
|
-n ${bind8_log_numfiles} -s ${bind8_log_minsize} -d \ |
|
-z ${bind8_log_complevel} -o @l_susr@ -o @l_mgrp@ -m 644 \ |
|
-P "${bind8_log_prolog}" \ |
|
-E "${bind8_log_epilog} && rc bind8 restart" \ |
|
@l_prefix@/var/bind/named.log |
|
|
|
|