Update startup

This commit is contained in:
Wonderfall 2017-10-31 13:33:56 +01:00 committed by GitHub
parent 84798e51b2
commit 62018fd8de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,7 +194,15 @@ f_log INF "Start reverse configuration ..."
# Prepare container
f_log INF "Create user 'reverse'"
addgroup -g ${GID} reverse && adduser -H -s /bin/sh -D -G reverse -u ${UID} reverse
if [ "$(grep ${GID} /etc/group)" == "" ]; then
addgroup -g ${GID} reverse
else
GROUP_NAME=$(grep ${GID} /etc/group | cut -d: -f1)
fi
if [ "$(grep ${UID} /etc/passwd)" == "" ]; then
adduser -H -s /bin/sh -D -G ${GROUP_NAME} -u ${UID} reverse
fi
f_log INF "Create folder"
mkdir -p /nginx/sites-enabled /nginx /nginx/log /nginx/run /nginx/sites-enabled /nginx/ssl /nginx/ssl/selfsigned/dhparam