diff --git a/torxi.sh b/torxi.sh index 2da674f..b0d3bb5 100755 --- a/torxi.sh +++ b/torxi.sh @@ -61,10 +61,10 @@ function print_banner { function startupChecks { #Make sure we are root - if [ "$(whoami)" != "root" ]; then - printf "$red%s$transparent\n\n" "[This script needs to be run as root or with sudo.]" - exit 1 - fi +# if [ "$(whoami)" != "root" ]; then +# printf "$red%s$transparent\n\n" "[This script needs to be run as root or with sudo.]" +# exit 1 +# fi #Is Docker Daemon running? docker ps &> /dev/null @@ -306,7 +306,17 @@ function checkip { function geoiplookup { geoipreply=$(curl -s "ipinfo.io/${1}") - export _geoipmsg="We're surfing from ${1} geolocated at $(echo $geoipreply|jq -r .city), in $(echo $geoipreply|jq -r .region) ($(echo $geoipreply|jq -r .country))" + _city="$(echo $geoipreply|jq -r .city)" + _region="$(echo $geoipreply|jq -r .region)" + _country="$(echo $geoipreply|jq -r .country)" + + if [ "$_city" != "$_region" ];then + _location="$_city, in $_region ($_country)" + else + _location="$_city ($_country)" + fi + + export _geoipmsg="We're surfing from ${1} geolocated at $_location" } function start_vnc {