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
|
# --- Ensure Unix user "scodoc" exists
|
||||||
check_create_scodoc_user() {
|
check_create_scodoc_user() {
|
||||||
if [ $(id -u "${SCODOC_USER}" &> /dev/null) ]
|
id -u "${SCODOC_USER}" &> /dev/null
|
||||||
|
if [ "$?" != 0 ]
|
||||||
then
|
then
|
||||||
echo "Creating unix user ${SCODOC_USER}"
|
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
|
else
|
||||||
echo "Unix user ${SCODOC_USER} exists"
|
echo "Unix user ${SCODOC_USER} exists"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user