aboutsummaryrefslogtreecommitdiffstats
path: root/add-user
diff options
context:
space:
mode:
Diffstat (limited to 'add-user')
-rwxr-xr-xadd-user5
1 files changed, 4 insertions, 1 deletions
diff --git a/add-user b/add-user
index 563b105..4b761e2 100755
--- a/add-user
+++ b/add-user
@@ -21,7 +21,10 @@ name=$3 # name of the user
dir=$4 # home directory
shell=$5 # shell
-/usr/sbin/useradd -r -M -s $shell -d $dir -c "system user for $pkg" $name > /dev/null
+if ! id $name /dev/null 2>&1; then
+ /usr/sbin/useradd -r -M \
+ -s $shell -d $dir -c "system user for $pkg" $name > /dev/null
+fi
exit 0