summaryrefslogtreecommitdiff
path: root/src/op_mode/show_ip_external.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/op_mode/show_ip_external.sh')
-rwxr-xr-xsrc/op_mode/show_ip_external.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/op_mode/show_ip_external.sh b/src/op_mode/show_ip_external.sh
new file mode 100755
index 000000000..275d05278
--- /dev/null
+++ b/src/op_mode/show_ip_external.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+# Detect an external IP address
+# Use random services for checking
+
+
+array=(
+ ipinfo.io/ip
+ ifconfig.me
+ ipecho.net/plain
+ icanhazip.com
+ v4.ident.me
+ checkip.amazonaws.com
+)
+
+size=${#array[@]}
+index=$(($RANDOM % $size))
+
+curl --silent ${array[$index]} | tr -d "[:space:]" && echo