scan nextcloud files after restore

This commit is contained in:
Bob Mottram 2017-05-08 18:50:48 +01:00
parent 959fcbad54
commit 1e282e9963
1 changed files with 16 additions and 0 deletions

View File

@ -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"