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.
55 lines
1.5 KiB
55 lines
1.5 KiB
#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc |
|
## |
|
## rc.bind -- Run-Commands |
|
## |
|
|
|
%config |
|
bind_enable="$openpkg_rc_def" |
|
bind_flags="" |
|
bind_log_prolog="true" |
|
bind_log_epilog="true" |
|
bind_log_numfiles="10" |
|
bind_log_minsize="1M" |
|
bind_log_complevel="9" |
|
|
|
%status -u @l_susr@ -o |
|
bind_usable="no" |
|
bind_active="no" |
|
@l_prefix@/sbin/named-checkconf >/dev/null && bind_usable="yes" |
|
@l_prefix@/sbin/rndc status >/dev/null 2>&1 && bind_active="yes" |
|
echo "bind_enable=\"$bind_enable\"" |
|
echo "bind_usable=\"$bind_usable\"" |
|
echo "bind_active=\"$bind_active\"" |
|
|
|
%start -p 100 -u @l_susr@ |
|
rcService bind enable yes || exit 0 |
|
rcService bind active yes && exit 0 |
|
@l_prefix@/sbin/named ${bind_flags} |
|
|
|
%stop -p 100 -u @l_susr@ |
|
rcService bind enable yes || exit 0 |
|
rcService bind active no && exit 0 |
|
@l_prefix@/sbin/rndc stop |
|
sleep 2 |
|
|
|
%restart -p 100 -u @l_susr@ |
|
rcService bind enable yes || exit 0 |
|
rcService bind active no && exit 0 |
|
rc bind stop start |
|
|
|
%reload -p 100 -u @l_susr@ |
|
rcService bind enable yes || exit 0 |
|
rcService bind active no && exit 0 |
|
@l_prefix@/sbin/rndc reload |
|
|
|
%daily -u @l_susr@ |
|
rcService bind enable yes || exit 0 |
|
|
|
# rotate logfile |
|
shtool rotate -f \ |
|
-n ${bind_log_numfiles} -s ${bind_log_minsize} -d \ |
|
-z ${bind_log_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ |
|
-P "${bind_log_prolog}" \ |
|
-E "${bind_log_epilog} && rc bind reload" \ |
|
@l_prefix@/var/bind/named.log |
|
|
|
|