diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-01-29 20:13:19 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-01-29 20:13:19 +0100 |
commit | 26b014bfa2dfca19bd97415ab335717e13fcc02a (patch) | |
tree | 205c530e4bc135b90b3338e3e1adebdbe79b6211 /etc | |
parent | 7f7dcfc232e5f8e02008de55d00b9b4faa5f17f5 (diff) |
Add myip function
Diffstat (limited to 'etc')
-rw-r--r-- | etc/functions/myip | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/functions/myip b/etc/functions/myip new file mode 100644 index 0000000..0775c45 --- /dev/null +++ b/etc/functions/myip @@ -0,0 +1,9 @@ +if ifdata -e wlan0 && [[ $(cat /sys/class/net/wlan0/operstate) == up ]]; then + ifdata -pa wlan0 + +else + ifdata -pa lan + +fi + +curl https://derf.homelinux.org/cgi-bin/clientinfo/ip.cgi |