move permissions run after creating the correct logs

This commit is contained in:
Daniel Hansson 2021-01-27 20:12:02 +01:00 committed by GitHub
parent a7310dd5e4
commit 1aba9ad2f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,18 +130,6 @@ for upgrading your server: https://shop.hanssonit.se/product/premium-support-per
exit 0
fi
# Set secure permissions
if [ ! -f "$SECURE" ]
then
mkdir -p "$SCRIPTS"
download_script STATIC setup_secure_permissions_nextcloud
chmod +x "$SECURE"
else
rm "$SECURE"
download_script STATIC setup_secure_permissions_nextcloud
chmod +x "$SECURE"
fi
# Check if the DIR actually is a file
if [ -f /var/log/nextcloud ]
then
@ -182,6 +170,18 @@ then
rm -f "$NCDATA"/*.log*
fi
# Set secure permissions
if [ ! -f "$SECURE" ]
then
mkdir -p "$SCRIPTS"
download_script STATIC setup_secure_permissions_nextcloud
chmod +x "$SECURE"
else
rm "$SECURE"
download_script STATIC setup_secure_permissions_nextcloud
chmod +x "$SECURE"
fi
# Remove the local lib.sh since it's causing issues with new functions (2020-06-01)
if [ -f $SCRIPTS/lib.sh ]
then