bind: created /var/run/named directory
Side-effect of dropping capabilities(7) with last commit is now we need the `/var/run/named/` directory created for us at startup. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
This commit is contained in:
parent
a11d34617a
commit
daf6b8b212
1 changed files with 7 additions and 1 deletions
|
@ -21,7 +21,6 @@ dyndir=/tmp/bind
|
||||||
|
|
||||||
conf_local_file=$dyndir/named.conf.local
|
conf_local_file=$dyndir/named.conf.local
|
||||||
|
|
||||||
|
|
||||||
fix_perms() {
|
fix_perms() {
|
||||||
for dir in $libdir $logdir $cachedir $dyndir; do
|
for dir in $libdir $logdir $cachedir $dyndir; do
|
||||||
test -e "$dir" || {
|
test -e "$dir" || {
|
||||||
|
@ -41,6 +40,13 @@ start_service() {
|
||||||
group_exists bind 57 || group_add bind 57
|
group_exists bind 57 || group_add bind 57
|
||||||
fix_perms
|
fix_perms
|
||||||
|
|
||||||
|
local runnamed=$(dirname $pid_file)
|
||||||
|
# with dropped privileges, we need this created for us
|
||||||
|
[ -d $runnamed ] || {
|
||||||
|
mkdir -m 0755 $runnamed
|
||||||
|
chown bind.bind $runnamed
|
||||||
|
}
|
||||||
|
|
||||||
rndc-confgen > $rndc_temp
|
rndc-confgen > $rndc_temp
|
||||||
|
|
||||||
sed -r -n \
|
sed -r -n \
|
||||||
|
|
Loading…
Reference in a new issue