From 1aba9ad2f79eaaee2444f7767dc8cf6fc8fb6c17 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Wed, 27 Jan 2021 20:12:02 +0100 Subject: [PATCH] move permissions run after creating the correct logs --- nextcloud_update.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/nextcloud_update.sh b/nextcloud_update.sh index d2734112..572d4ce5 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -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