[nextcloud] add ability to disable permissions check (for large installations)

This commit is contained in:
2018-07-24 20:23:40 +02:00
parent 83c2b99580
commit 56507a1aa2
4 changed files with 19 additions and 12 deletions

View File

@ -22,16 +22,20 @@ if [ ! -d /data/session ]; then
mkdir -p /data/session;
fi
echo "Updating permissions..."
for dir in /nextcloud /data /config /apps2 /var/log /php /nginx /tmp /etc/s6.d; do
if $(find $dir ! -user $UID -o ! -group $GID|egrep '.' -q); then
echo "Updating permissions in $dir..."
chown -R $UID:$GID $dir
else
echo "Permissions in $dir are correct."
fi
done
echo "Done updating permissions."
if [ "$CHECK_PERMISSIONS" = "1" ]; then
echo "Updating permissions..."
for dir in /nextcloud /data /config /apps2 /var/log /php /nginx /tmp /etc/s6.d; do
if $(find $dir ! -user $UID -o ! -group $GID|egrep '.' -q); then
echo "Updating permissions in $dir..."
chown -R $UID:$GID $dir
else
echo "Permissions in $dir are correct."
fi
done
echo "Done updating permissions."
else
echo "Skip checking permissions"
fi
if [ ! -f /config/config.php ]; then
# New installation, run the setup