mirror of
https://github.com/pschiffe/docker-pdns.git
synced 2024-11-14 04:07:57 +01:00
24b96e74a1
* Add API conf directory * Correct PDNS recursor user on fedora * Fix config user right
23 lines
510 B
Bash
Executable file
23 lines
510 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -euo pipefail
|
|
|
|
# Configure base vars
|
|
: "${PDNS_local_port:=53}"
|
|
: "${PDNS_local_address:=0.0.0.0}"
|
|
|
|
export PDNS_local_port PDNS_local_address
|
|
|
|
# Create config file from template
|
|
envtpl < /recursor.conf.tpl > /etc/pdns/recursor.conf
|
|
|
|
# fix config right
|
|
if [ getent passwd | grep -c '^pdns-recursor:' ]; then
|
|
# Fedora user
|
|
chown pdns-recursor:pdns-recursor /etc/pdns/recursor.conf
|
|
else
|
|
# Alpine user
|
|
chown recursor:recursor /etc/pdns/recursor.conf
|
|
fi
|
|
|
|
exec /usr/sbin/pdns_recursor
|