From ec85797ac10d92cc202233e6dac58fe55a1a9ff7 Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Wed, 31 Jul 2024 17:44:59 -0700 Subject: [PATCH] Updated Nextcloud Maintenance Script to Sovran_SystemsOS_Updater --- .../Update_Sovran_SystemsOS.sh | 25 +++---------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS.sh b/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS.sh index 980c0b8..08dc5b2 100755 --- a/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS.sh +++ b/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS.sh @@ -36,33 +36,16 @@ popd PASTA () { -time_stamp=$(date +%Y-%m-%d-%T) +ssh root@localhost "sudo -u caddy php /var/lib/www/nextcloud/occ maintenance:repair" -ssh root@localhost "sudo -u caddy php /var/lib/www/nextcloud/occ maintenance:repair && sudo -u caddy php /var/lib/www/nextcloud/occ db:add-missing-indices &> /home/free/Documents/Updater_App_Logs/{$time_stamp}-Updater_Nextcloud_Maintenance_Log.txt" } -PASTA_SAUCE () { +PASTA_SECONDS () { -pushd /home/free/Documents/Updater_App_Logs +ssh root@localhost "sudo -u caddy php /var/lib/www/nextcloud/occ db:add-missing-indices" -file=$(ls -Art | tail -n 1) - -if grep -w "nix: error" $file ; then - - zenity --error \ - --width=1300 \ - --title="Sovran_SystemsOS_Updater" \ - --text="Could not complete the Nextcloud Maintenance. Check the Updater_Nextcloud_Maintenance_Log.txt in your Documents under Updater_App_Logs folder for more details." - - exit 1 - -fi - -popd - } - FLAKE () { time_stamp=$(date +%Y-%m-%d-%T) @@ -173,7 +156,7 @@ else PASTA | zenity --progress --no-cancel --auto-close --width=500 --pulsate --text="Nextcloud Maintenance..." --title="Sovran_SystemsOS_Updater" - PASTA_SAUCE + PASTA_SECONDS FLAKE | zenity --progress --no-cancel --auto-close --width=500 --pulsate --text="Updating Flake now..." --title="Sovran_SystemsOS_Updater"