summaryrefslogtreecommitdiff
path: root/debian/userv-dyndns.postinst
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2013-12-09 16:43:53 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2013-12-09 16:43:53 +0000
commit0c1c66930bc8d68b849d5bf91da29d30d51dc289 (patch)
tree8b4f8f524ac833d0afca1e4796b331e7320e9508 /debian/userv-dyndns.postinst
parentf07baecf09e3be6b1ef01a02fd31f95db702ad86 (diff)
downloaduserv-utils-0c1c66930bc8d68b849d5bf91da29d30d51dc289.tar.gz
Improve adduser calls:
- no longer guard with calls to id, as adduser --quiet is idempotent - pass --shell /bin/false and --no-create-home
Diffstat (limited to 'debian/userv-dyndns.postinst')
-rwxr-xr-xdebian/userv-dyndns.postinst7
1 files changed, 4 insertions, 3 deletions
diff --git a/debian/userv-dyndns.postinst b/debian/userv-dyndns.postinst
index da9acd7..a6779f9 100755
--- a/debian/userv-dyndns.postinst
+++ b/debian/userv-dyndns.postinst
@@ -23,7 +23,8 @@ set -e
#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