From 7e257ece8b42f6edce1e1cb0587cbfd1ee61b65b Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Sat, 2 Dec 2023 11:18:25 -0800 Subject: [PATCH] updated updater app to include better handeling with ipv4 and 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 7e5e703..3956515 100755 --- a/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS.sh +++ b/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS.sh @@ -3,7 +3,9 @@ set -o nounset -ID=$(echo | cat /var/lib/domains/wordpress) +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" | @@ -20,7 +22,7 @@ curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovr else - ssh root@${ID} 'flatpak update -y' | + ssh root@${ID} || ssh root${ID6} 'flatpak update -y' | zenity --progress \ --no-cancel \ @@ -43,7 +45,7 @@ curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovr fi - ssh root@${ID} 'cd /etc/nixos; nix flake update' | + ssh root@${ID} || ssh root${ID6} 'cd /etc/nixos; nix flake update' | zenity --progress \ --no-cancel \ @@ -65,7 +67,7 @@ curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovr fi - ssh root@${ID} 'nixos-rebuild switch --impure' | + ssh root@${ID} || ssh root${ID6} 'nixos-rebuild switch --impure' | zenity --progress \ --no-cancel \