diff options
author | budulinek <budulinek@users.noreply.github.com> | 2020-01-19 05:22:57 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2020-01-19 05:22:57 +0300 |
commit | e0ae40b8dbaeabbbe57fcb85dd8f6975216227e9 (patch) | |
tree | ead0be62a564630731ea10cc9ba7f1f30fc788dd | |
parent | 6359ca307d3a1412c2b29fa9a9e69575ca4a4974 (diff) |
Add user only if it does not exist. (#1059)v1.20.4
If user already exists, useradd ends with error and terminates the whole instalation process.
-rw-r--r-- | ncp.sh | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -123,7 +123,7 @@ EOF a2ensite ncp-activation ## NCP USER FOR AUTHENTICATION - useradd --home-dir /nonexistent "$WEBADMIN" + id -u "$WEBADMIN" &>/dev/null || useradd --home-dir /nonexistent "$WEBADMIN" echo -e "$WEBPASSWD\n$WEBPASSWD" | passwd "$WEBADMIN" chsh -s /usr/sbin/nologin "$WEBADMIN" |