From da7a679a373df5f04a4c5af8b8dbc56d6c625f88 Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Sat, 23 Sep 2023 21:12:42 -0700 Subject: [PATCH] updated updter app to includ ipv6 --- .../Updater Source Files/Update_Sovran_SystemsOS.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 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 a8a457c..69276ad 100755 --- a/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS.sh +++ b/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS.sh @@ -2,7 +2,9 @@ set -o nounset -ID=$(dig @resolver4.opendns.com myip.opendns.com +short -4) +ID=$(timeout 1 -k dig @resolver4.opendns.com myip.opendns.com +short -4) + +ID6=$(timeout 1 dig -t aaaa +short myip.opendns.com @resolver1.opendns.com) curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovran_SystemsOS_Updater/Updater%20Source%20Files/Intro.md" | @@ -17,7 +19,7 @@ curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovr else - ssh -i /home/free/.ssh/sovranpro_login root@${ID} 'cd /etc/nixos; nix flake update' | + ssh -i /home/free/.ssh/sovranpro_login root@${ID} 'cd /etc/nixos; nix flake update' || ssh -i /home/free/.ssh/sovranpro_login root@${ID6} 'cd /etc/nixos; nix flake update' | zenity --progress \ --no-cancel \ @@ -39,7 +41,7 @@ curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovr fi - ssh -i /home/free/.ssh/sovranpro_login root@${ID} "nixos-rebuild switch --impure" | + ssh -i /home/free/.ssh/sovranpro_login root@${ID} 'cd /etc/nixos; nix flake update' || ssh -i /home/free/.ssh/sovranpro_login root@${ID6} "nixos-rebuild switch --impure" | zenity --progress \ --no-cancel \ @@ -70,4 +72,4 @@ curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovr fi -exit 0 \ No newline at end of file +exit 0