diff --git a/src/freedombone-app-nextcloud b/src/freedombone-app-nextcloud index 6fe740df..1163fe67 100755 --- a/src/freedombone-app-nextcloud +++ b/src/freedombone-app-nextcloud @@ -179,6 +179,9 @@ function upgrade_nextcloud { chown -R www-data:www-data /var/www/$NEXTCLOUD_DOMAIN_NAME/htdocs/config chown -R www-data:www-data /var/www/$NEXTCLOUD_DOMAIN_NAME/htdocs/data + cd /var/www/$NEXTCLOUD_DOMAIN_NAME/htdocs + sudo -u www-data ./occ files:cleanup + sudo -u www-data ./occ files:scan --all } @@ -221,6 +224,10 @@ function restore_local_nextcloud { if [ -d $temp_restore_dir ]; then rm -rf $temp_restore_dir fi + + cd $nextcloud_dir + sudo -u www-data ./occ files:cleanup + sudo -u www-data ./occ files:scan --all fi } @@ -252,6 +259,7 @@ function restore_remote_nextcloud { if grep -q "nextcloud domain" $COMPLETION_FILE; then echo $"Restoring nextcloud" NEXTCLOUD_DOMAIN_NAME=$(get_completion_param "nextcloud domain") + nextcloud_dir=/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs function_check nextcloud_create_database nextcloud_create_database @@ -261,6 +269,10 @@ function restore_remote_nextcloud { if [ -d /root/tempnextcloud ]; then rm -rf /root/tempnextcloud fi + + cd $nextcloud_dir + sudo -u www-data ./occ files:cleanup + sudo -u www-data ./occ files:scan --all fi } @@ -550,6 +562,10 @@ function install_nextcloud_main { ./occ config:system:set trusted_domains 1 --value=$NEXTCLOUD_DOMAIN_NAME chmod g+w /var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs/config/config.php chown -R www-data:www-data /var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs + chmod 0644 .htaccess + chmod 0750 data + sudo -u www-data ./occ files:cleanup + sudo -u www-data ./occ files:scan --all set_completion_param "nextcloud domain" "$NEXTCLOUD_DOMAIN_NAME"