From 44420c89ab9b55a4805fe927b07ce9337897d63a Mon Sep 17 00:00:00 2001 From: osm0sis Date: Wed, 7 Aug 2024 12:01:16 -0300 Subject: [PATCH] autopif.sh: retain previous Advanced Settings values, fixes --- module/autopif.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/module/autopif.sh b/module/autopif.sh index 482b70a..5d6f85c 100644 --- a/module/autopif.sh +++ b/module/autopif.sh @@ -15,7 +15,7 @@ esac; DIR=$(dirname "$(readlink -f "$DIR")"); if ! which wget >/dev/null || grep -q "wget-curl" $(which wget); then - if [ -f /data/adb/magisk/busybox ]; then + if [ -f /data/adb/magisk/busybox ] && /data/adb/magisk/busybox ping -c1 -s2 sourceforge.net 2>&1 | grep -vq "bad address"; then wget() { /data/adb/magisk/busybox wget "$@"; } elif [ -f /data/adb/ksu/bin/busybox ]; then wget() { /data/adb/ksu/bin/busybox wget "$@"; } @@ -73,15 +73,26 @@ fi; item "Converting inject_fields.xml to pif.json ..."; (echo '{'; grep -o '