2016-01-11 02:56:33 +00:00
|
|
|
#!/bin/sh
|
2018-11-19 21:08:35 +00:00
|
|
|
OPTIONS=$@
|
2020-04-30 03:04:40 +00:00
|
|
|
# "Run Time" changes - needed for when creating a *new* directory/first-time volume map
|
|
|
|
# A great example of this is "/var/cache/bind" for dynamic configs, and mapping it in
|
|
|
|
# The first time around, it will not be owned by named:named, and thus it won't be writable
|
2020-12-14 00:57:06 +00:00
|
|
|
mkdir /tmp/bind
|
2019-05-04 06:51:14 +00:00
|
|
|
chown -R root:named /etc/bind /var/run/named
|
2020-12-14 00:57:06 +00:00
|
|
|
chown -R named:named /var/cache/bind /tmp/bind
|
2020-05-12 06:04:44 +00:00
|
|
|
chmod -R 770 /etc/bind /var/cache/bind /var/run/named
|
|
|
|
find /etc/bind /var/cache/bind -type f -exec chmod 640 -- {} +
|
2020-03-07 04:23:35 +00:00
|
|
|
# By default - run in foreground and log to STDERR (console)
|
|
|
|
# can be changed by running container with: -e "BIND_LOG=-f"
|
2020-12-14 00:57:06 +00:00
|
|
|
cd /tmp/bind
|
2020-03-07 04:23:35 +00:00
|
|
|
exec /usr/sbin/named -c /etc/bind/named.conf $BIND_LOG -u named $OPTIONS
|