updated updater script and added root script

This commit is contained in:
naturallaw77 2023-06-18 08:56:11 -07:00
parent 6063a81219
commit 52657dc772
2 changed files with 62 additions and 47 deletions

View File

@ -4,55 +4,12 @@ set -o nounset
ID=$(curl ifconfig.me)
curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovran_SystemsOS_Updater/Updater%20Source%20Files/Intro.md" |
zenity --text-info \
--title="Sovran_SystemsOS Updater" \
--width=1110 \
--height=710
cd /home/free/Downloads
if [[ $? -eq 1 ]]; then
exit 1
wget "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovran_SystemsOS_Reseter/Reseter%20Source%20Files/Master_Passwords_Reset_Root.sh"
else
bash /home/free/Downloads/Master_Passwords_Reset.sh | zenity --progress --no-cancel --pulsate --auto-close --width=500 --title="Sovran_SystemsOS_Reseter" --text="Please Wait. Passwords Are Being Reset. This May Take Some Time..."
#id=$(curl ifconfig.me)
ssh -i /home/free/.ssh/sovranpro_login root@${ID} 'cd /etc/nixos; nix flake update'
if [[ $? != 0 ]]; then
echo "Could not update flake -- exiting" |
zenity --text-info \
--title="Sovran_SystemsOS Updater" \
--width=1110 \
--height=710
exit 1
fi
ssh -i /home/free/.ssh/sovranpro_login root@${ID} "nixos-rebuild switch --impure" |
zenity --progress \
--no-cancel \
--auto-close \
--pulsate \
--title="Sovran_SystemsOS Updater"
if [[ $? != 0 ]]; then
echo "Could not Update Sovran_SystemsOS -- exiting" |
zenity --text-info \
--title="Sovran_SystemsOS Updater" \
--width=1110 \
--height=710
exit 1
fi
zenity --info \
--ellipsize \
--no-wrap \
--title="Sovran_SystemsOS Updater" \
--text="Complete! Please Reboot."
fi
rm -rf /home/free/Downloads/Master_Passwords_Reset.sh
exit 0

View File

@ -0,0 +1,58 @@
#!/usr/bin/env bash
set -o nounset
ID=$(curl ifconfig.me)
curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovran_SystemsOS_Updater/Updater%20Source%20Files/Intro.md" |
zenity --text-info \
--title="Sovran_SystemsOS Updater" \
--width=1110 \
--height=710
if [[ $? -eq 1 ]]; then
exit 1
else
#id=$(curl ifconfig.me)
ssh -i /home/free/.ssh/sovranpro_login root@${ID} 'cd /etc/nixos; nix flake update'
if [[ $? != 0 ]]; then
echo "Could not update flake -- exiting" |
zenity --text-info \
--title="Sovran_SystemsOS Updater" \
--width=1110 \
--height=710
exit 1
fi
ssh -i /home/free/.ssh/sovranpro_login root@${ID} "nixos-rebuild switch --impure" |
zenity --progress \
--no-cancel \
--auto-close \
--pulsate \
--title="Sovran_SystemsOS Updater"
if [[ $? != 0 ]]; then
echo "Could not Update Sovran_SystemsOS -- exiting" |
zenity --text-info \
--title="Sovran_SystemsOS Updater" \
--width=1110 \
--height=710
exit 1
fi
zenity --info \
--ellipsize \
--no-wrap \
--title="Sovran_SystemsOS Updater" \
--text="Complete! Please Reboot."
fi
exit 0