Fix docker
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 28s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 28s
This commit is contained in:
@@ -24,15 +24,19 @@ ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
|
|||||||
echo "$TZ" >/etc/timezone
|
echo "$TZ" >/etc/timezone
|
||||||
echo "Timezone set to $TZ"
|
echo "Timezone set to $TZ"
|
||||||
|
|
||||||
# Create nsupdate group
|
# Create group if it doesn't exist yet
|
||||||
addgroup -S --gid $PGID "$USERNAME"
|
if ! getent group "$USERNAME" > /dev/null 2>&1; then
|
||||||
|
addgroup -g "$PGID" "$USERNAME"
|
||||||
|
fi
|
||||||
|
|
||||||
# Create nsupdate user
|
# Create user if it doesn't exist yet
|
||||||
adduser -S -u $PUID -G "$USERNAME" -D -H -s /bin/false "$USERNAME"
|
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"
|
CRON_FILE="/etc/crontabs/$USERNAME"
|
||||||
mkdir -p /etc/crontabs
|
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"
|
chmod 600 "$CRON_FILE"
|
||||||
|
|
||||||
# Set correct permissions
|
# Set correct permissions
|
||||||
|
|||||||
Reference in New Issue
Block a user