Skip to content

Commit

Permalink
Fix issue with renaming the run user (serversideup/spin#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydrogers committed Oct 9, 2024
1 parent e09d084 commit 82c911f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rootfs/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ if { [ ! -z "${PUID}" ] && [ "${PUID}" != "$default_uid" ]; } || { [ ! -z "${PGI
groupmod -g "999${PGID}" "${old_group}"
fi

# Change UID and GID of Ansible user and group
usermod -u "${PUID}" ansible 2>&1 >/dev/null || echo "Error changing user ID."
groupmod -g "${PGID}" ansible 2>&1 >/dev/null || echo "Error changing group ID."
# Change UID and GID of run_as user and group
usermod -u "${PUID}" "${run_as_user}" 2>&1 >/dev/null || echo "Error changing user ID."
groupmod -g "${PGID}" "${run_as_user}" 2>&1 >/dev/null || echo "Error changing group ID."

debug_print "Changing ownership of all files and directories..."
chown "${PUID}:${PGID}" "/home/${run_as_user}" "/home/${run_as_user}/.ssh" "${ANSIBLE_HOME}" "/ssh"
Expand Down

0 comments on commit 82c911f

Please sign in to comment.