removed root permissions check and edited location message rendering
This commit is contained in:
20
torxi.sh
20
torxi.sh
@@ -61,10 +61,10 @@ function print_banner {
|
|||||||
|
|
||||||
function startupChecks {
|
function startupChecks {
|
||||||
#Make sure we are root
|
#Make sure we are root
|
||||||
if [ "$(whoami)" != "root" ]; then
|
# if [ "$(whoami)" != "root" ]; then
|
||||||
printf "$red%s$transparent\n\n" "[This script needs to be run as root or with sudo.]"
|
# printf "$red%s$transparent\n\n" "[This script needs to be run as root or with sudo.]"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
#Is Docker Daemon running?
|
#Is Docker Daemon running?
|
||||||
docker ps &> /dev/null
|
docker ps &> /dev/null
|
||||||
@@ -306,7 +306,17 @@ function checkip {
|
|||||||
|
|
||||||
function geoiplookup {
|
function geoiplookup {
|
||||||
geoipreply=$(curl -s "ipinfo.io/${1}")
|
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 {
|
function start_vnc {
|
||||||
|
|||||||
Reference in New Issue
Block a user