diff --git a/module/autopif.sh b/module/autopif.sh index 482b70ae..5d6f85c8 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 '