updated source file

This commit is contained in:
naturallaw77 2023-06-03 17:06:12 -07:00
parent 051bac2360
commit 526aa984af
2 changed files with 79 additions and 25 deletions

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -o nounset
curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovran_SystemsOS_Updater/Updater%20Source%20Files/Intro.md" | curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovran_SystemsOS_Updater/Updater%20Source%20Files/Intro.md" |
zenity --text-info \ zenity --text-info \
@ -9,39 +10,45 @@ zenity --text-info \
if [[ $? -eq 1 ]]; then if [[ $? -eq 1 ]]; then
exit 1 exit 1
else
ssh -i /home/free/.ssh/sovranpro_login root@192.168.1.32 '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 fi
password=$(zenity --password --title="Sovran_SystemsOS Updater") ssh -i /home/free/.ssh/sovranpro_login root@192.168.1.32 "nixos-rebuild switch --impure" |
zenity --progress \
if [ $? -eq 1 ] ; then
exit 2
else
pushd /etc/nixos/
echo -e "$password" | sudo -S nix flake update
popd
echo -e "$password" | sudo -S nixos-rebuild switch --impure |
zenity --progress \
--no-cancel \ --no-cancel \
--auto-close \ --auto-close \
--pulsate \ --pulsate \
--title="Sovran_SystemsOS Updater" --title="Sovran_SystemsOS Updater"
if [[ $? != 0 ]]; then
zenity --info \ echo "Could not Update Sovran_SystemsOS -- exiting" |
--ellipsize \ zenity --text-info \
--no-wrap \
--title="Sovran_SystemsOS Updater" \ --title="Sovran_SystemsOS Updater" \
--text="Complete! Please Reboot." --width=1110 \
--height=710
fi exit 1
fi
zenity --info \
--ellipsize \
--no-wrap \
--title="Sovran_SystemsOS Updater" \
--text="Complete! Please Reboot."
fi
exit 0 exit 0

View File

@ -0,0 +1,47 @@
#!/usr/bin/env bash
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
fi
password=$(zenity --password --title="Sovran_SystemsOS Updater")
if [ $? -eq 1 ] ; then
exit 2
else
pushd /etc/nixos/
echo -e "$password" | sudo -S nix flake update
popd
echo -e "$password" | sudo -S nixos-rebuild switch --impure |
zenity --progress \
--no-cancel \
--auto-close \
--pulsate \
--title="Sovran_SystemsOS Updater"
zenity --info \
--ellipsize \
--no-wrap \
--title="Sovran_SystemsOS Updater" \
--text="Complete! Please Reboot."
fi
exit 0