- no longer guard with calls to id, as adduser --quiet is idempotent
- pass --shell /bin/false and --no-create-home
* Add debhelper token to postinst scripts.
* Change default user for git-daemon to userv-git and
default user for dyndns to userv-dyndns.
+ * Improve adduser calls:
+ - no longer guard with calls to id, as adduser --quiet is idempotent
+ - pass --shell /bin/false and --no-create-home
--
#DEBHELPER#
user="$(sed -n '/^[a-z]/{p;q;}' /etc/userv/dyndns-service-users)"
-if id $user >/dev/null 2>&1; then exit 0; fi
-adduser --system --group --gecos 'userv dyndns' \
- --home /etc/userv
+if [ "$user" ]; then
+ adduser --system --quiet --group --gecos 'userv dyndns' \
+ --home /etc/userv --no-create-home --shell /bin/false $user
+fi
#DEBHELPER#
if [ "$GITDUSER" ]; then
- if id $GITDUSER >/dev/null 2>&1; then exit 0; fi
-
- adduser --system --group --gecos 'userv git daemon' \
- --home /etc/userv $GITDUSER
+ adduser --system --quiet --group --gecos 'userv git daemon' \
+ --home /etc/userv --no-create-home --shell /bin/false $GITDUSER
fi