Fix docker
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 28s

This commit is contained in:
2026-04-26 20:25:13 +02:00
parent 852da10d2e
commit 4128459e35

View File

@@ -24,15 +24,19 @@ ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
echo "$TZ" >/etc/timezone
echo "Timezone set to $TZ"
# Create nsupdate group
addgroup -S --gid $PGID "$USERNAME"
# Create group if it doesn't exist yet
if ! getent group "$USERNAME" > /dev/null 2>&1; then
addgroup -g "$PGID" "$USERNAME"
fi
# Create nsupdate user
adduser -S -u $PUID -G "$USERNAME" -D -H -s /bin/false "$USERNAME"
# Create user if it doesn't exist yet
if ! getent passwd "$USERNAME" > /dev/null 2>&1; then
adduser -u "$PUID" -G "$USERNAME" -D -H -s /bin/false "$USERNAME"
fi
CRON_FILE="/etc/crontabs/$USERNAME"
mkdir -p /etc/crontabs
printf '%s %s %s\n' "$SCHEDULE" "$USERNAME" "$COMMAND" > "$CRON_FILE"
printf '%s %s\n' "$SCHEDULE" "$COMMAND" > "$CRON_FILE"
chmod 600 "$CRON_FILE"
# Set correct permissions