mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
Add user only if it does not exist. (#1059)
If user already exists, useradd ends with error and terminates the whole instalation process.
This commit is contained in:
parent
6359ca307d
commit
e0ae40b8db
2
ncp.sh
2
ncp.sh
@ -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"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user