Revert "fix: symlink /etc/dns to /config/dns at build time, drop entrypoint"
This reverts commit ed54778a0d.
This commit is contained in:
22
technitium_dns/entrypoint.sh
Normal file
22
technitium_dns/entrypoint.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Technitium ships /etc/dns as a real directory in the image. We need it
|
||||
# to point at the persistent HA add-on config volume instead. Remove the
|
||||
# directory and replace with a symlink at runtime (after HA mounts volumes).
|
||||
|
||||
DATA="/config/dns"
|
||||
|
||||
mkdir -p "$DATA"
|
||||
|
||||
if [ -d /etc/dns ] && [ ! -L /etc/dns ]; then
|
||||
# Seed: copy any existing default config into the volume on first run
|
||||
if [ -z "$(ls -A "$DATA" 2>/dev/null)" ]; then
|
||||
cp -a /etc/dns/. "$DATA"/
|
||||
fi
|
||||
rm -rf /etc/dns
|
||||
fi
|
||||
|
||||
ln -sf "$DATA" /etc/dns
|
||||
|
||||
exec dotnet DnsServerApp.dll
|
||||
Reference in New Issue
Block a user