update reseter.app

This commit is contained in:
naturallaw77 2023-09-05 08:11:40 -07:00
parent 4427daf8f1
commit a5ac6983da

View File

@ -466,56 +466,11 @@ EOF
fi
#### OnlyOffice Key Part 1 ####
ssh -i /home/free/.ssh/sovranpro_login root@${ID} << 'EOF'
echo -n $(pwgen -s 33 -1) > /var/lib/secrets/onlyofficejwtSecretFile
EOF
if [[ $? != 0 ]]; then
zenity --error \
--ellipsize \
--no-wrap \
--title="Sovran_SystemsOS_Reseter" \
--text="Could Not Update OnlyOffice Secret Part 1"
exit 1
fi
#### NixOS Rebuild Switch ####
ssh -i /home/free/.ssh/sovranpro_login root@${ID} 'nixos-rebuild switch --impure'
#### OnlyOffice Key Part 2 ####
ssh -i /home/free/.ssh/sovranpro_login root@${ID} << 'EOF'
OF=$(cat /var/lib/secrets/onlyofficejwtSecretFile)
sudo -u caddy php /var/lib/www/nextcloud/occ config:app:set onlyoffice jwt_secret --value="${OF}" --update-only
EOF
if [[ $? != 0 ]]; then
zenity --error \
--ellipsize \
--no-wrap \
--title="Sovran_SystemsOS_Reseter" \
--text="Could Not Update OnlyOffice Secret Part 2"
exit 1
fi
#### FINAL RESETER TAG ####
ssh -i /home/free/.ssh/sovranpro_login root@${ID} 'touch /var/lib/beacons/reseter/completed'