Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnewhall committed Feb 7, 2021
2 parents 04f3af8 + 65d0cb0 commit e3df89b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/after-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@

OS="$(uname -s)"

if [ "${OS}" == "Linux" ]; then
if [ "${OS}" = "Linux" ]; then
# Make a user and group for this app, but only if it does not already exist.
id {{BINARY}} >/dev/null 2>&1 || \
useradd --system --user-group --no-create-home --home-dir /tmp --shell /bin/false {{BINARY}}
elif [ "${OS}" == "OpenBSD" ]; then
elif [ "${OS}" = "OpenBSD" ]; then
id {{BINARY}} >/dev/null 2>&1 || \
useradd -g =uid -d /tmp -s /bin/false {{BINARY}}
elif [ "${OS}" == "FreeBSD" ]; then
elif [ "${OS}" = "FreeBSD" ]; then
id {{BINARY}} >/dev/null 2>&1 || \
pw useradd {{BINARY}} -d /tmp -w no -s /bin/false
else
echo "Unknown OS: ${OS}, this app may not work."
echo "Unknown OS: ${OS}, please add system user {{BINARY}} manually."
fi

if [ -x "/bin/systemctl" ]; then
Expand Down

0 comments on commit e3df89b

Please sign in to comment.