Skip to content

Commit

Permalink
packaging/debian: use useradd instead of adduser
Browse files Browse the repository at this point in the history
adduser is not always available.
  • Loading branch information
jasonish committed Oct 21, 2024
1 parent 0ba9cf3 commit 8cb646a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packaging/debian/after-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ USERNAME=evebox
HOMEDIR=/var/lib/evebox

if ! /usr/bin/getent passwd ${USERNAME} > /dev/null; then
if test -e /usr/sbin/adduser; then
/usr/sbin/adduser --system --home ${HOMEDIR} --group \
--disabled-login ${USERNAME}
else
echo "warning: adduser not found, evebox user not created"
fi
useradd --system \
--home-dir ${HOMEDIR} \
--user-group \
--shell /usr/sbin/nologin \
${USERNAME}
fi

0 comments on commit 8cb646a

Please sign in to comment.