This commit is contained in:
Lucas Faber authored and Lucas Vivohost committed 2026-09-14 09:20:47 +02:00
1 parent be436085b3
commit 9c379af76b
9 files changed
+883

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
#!/bin/bash
PUB_IP=$(wget -T 5 -qO- ifconfig.co)
printf "User: %s\n" "$(whoami)"
if [ "${PUB_IP}" != "" ]; then
LOC=$(wget -T 3 -qO- ifconfig.co/country)
CITY=$(wget -T 3 -qO- ifconfig.co/city)
printf "%s\t%s\t%s\n" "${PUB_IP}" "${LOC}" "${CITY}"
else
printf "No Connection\n"
fi
if [ "$(grep deluge-user /etc/passwd)" != "" ]; then
printf "User: deluge-user\n"
PUB_IP=$(sudo /home/lucas/scripts/deluge_user_cmd.sh wget -T 3 -qO- ifconfig.co)
if [ "${PUB_IP}" == "" ]; then
PUB_IP=$(sudo /home/lucas/scripts/deluge_user_cmd.sh curl --connect-timeout 3 https://ipinfo.io/ip)
fi
if [ "${PUB_IP}" != "" ]; then
LOC=$(sudo /home/lucas/scripts/deluge_user_cmd.sh wget -T 3 -qO- ifconfig.co/country)
if [ "${LOC}" == "" ]; then
LOC=$(sudo /home/lucas/scripts/deluge_user_cmd.sh curl --connect-timeout 3 https://ipinfo.io/country 2>>/dev/null)
fi
CITY=$(sudo /home/lucas/scripts/deluge_user_cmd.sh wget -T 3 -qO- ifconfig.co/city)
if [ "${CITY}" == "" ]; then
CITY=$(sudo /home/lucas/scripts/deluge_user_cmd.sh curl --connect-timeout 3 https://ipinfo.io/city 2>>/dev/null)
fi
printf "%s\t%s\t%s\n" "${PUB_IP}" "${LOC}" "${CITY}"
else
printf "No Connection\n"
fi
fi