Check for UID/GID and add nextcloud user

This commit is contained in:
hoellen 2021-01-03 13:25:23 +01:00
parent 3a26ffb087
commit b60120888d

View File

@ -37,6 +37,14 @@ for dir in /nextcloud /data /config /apps2 /var/log /php /nginx /tmp /etc/s6.d;
done
echo "Done updating permissions."
echo "Check for UserID ${UID}"
if ! $(grep ":${UID}:" /etc/passwd 1>/dev/null 2>&1); then
echo "Creating user nextcloud with UID=${UID} and GID=${GID}."
/usr/sbin/adduser -g ${GID} -u ${UID} --disabled-password --gecos "" nextcloud
else
echo "An existing user with UID=${UID} was found, nothing to do."
fi
if [ ! -f /config/config.php ]; then
# New installation, run the setup
/usr/local/bin/setup.sh