First commit

This commit is contained in:
2025-05-16 00:19:15 +02:00
commit 45cffd4b9e
5 changed files with 83 additions and 0 deletions

29
entrypoint.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
set -e
# Default UID and GID if not specified
PUID=${PUID:-101}
PGID=${PGID:-101}
# Default timezone if not specified
TZ=${TZ:-Etc/UTC}
# Set the timezone
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
echo "$TZ" >/etc/timezone
echo "Timezone set to $TZ"
# Adjust GID for the nsd group
groupmod -o -g "$PGID" nsd
echo "GID for group nsd adjusted to $PGID"
# Adjust UID for the nsd user
usermod -o -u "$PUID" nsd
echo "UID for user nsd adjusted to $PUID"
# Set correct permissions
chown -R nsd:nsd /var/lib/nsd /var/run/nsd /etc/nsd
echo "Permissions adjusted"
# Start NSD in the foreground with reduced warnings
echo "Starting NSD..."
exec nsd -d