Skip to content

Commit

Permalink
Allow to set GROUPNAME and avoid inferring it
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs committed Nov 20, 2024
1 parent fd495c0 commit 9a9e494
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ if ! command -v fixuid >/dev/null; then
if [ -z "${USERNAME:-}" ]; then
error "The USERNAME environment variable must be set."
fi
GROUPNAME="$(id -gn "${USERNAME}")"
if ! getent passwd "${USERNAME}" >/dev/null; then
error "The user ${USERNAME} does not exist."
fi
GROUPNAME="${GROUPNAME:-"${USERNAME}"}"
if ! getent group "${GROUPNAME}" >/dev/null; then
error "The group ${GROUPNAME} does not exist."
fi
fixuid_version='0.6.0'
echo "Installing fixuid v${fixuid_version}"
fixuid_url="https://github.com/boxboat/fixuid/releases/download/v${fixuid_version}/fixuid-${fixuid_version}-linux-$(dpkg --print-architecture).tar.gz"
Expand Down

0 comments on commit 9a9e494

Please sign in to comment.