forked from ScoDoc/DocScoDoc
Fix install script (check_create_scodoc_user)
This commit is contained in:
parent
d45f9e25cc
commit
84c72fcb50
@ -61,10 +61,11 @@ init_postgres_user() { # run as root
|
||||
|
||||
# --- Ensure Unix user "scodoc" exists
|
||||
check_create_scodoc_user() {
|
||||
if [ $(id -u "${SCODOC_USER}" &> /dev/null) ]
|
||||
id -u "${SCODOC_USER}" &> /dev/null
|
||||
if [ "$?" != 0 ]
|
||||
then
|
||||
echo "Creating unix user ${SCODOC_USER}"
|
||||
adduser --no-create-home --shell /bin/bash --gecos "ScoDoc service" ${SCODOC_USER} || die "failed to create user"
|
||||
adduser --no-create-home --shell /bin/bash --gecos "ScoDoc service" "${SCODOC_USER}" || die "failed to create user"
|
||||
else
|
||||
echo "Unix user ${SCODOC_USER} exists"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user