Tabatha openbsd5.4 externalIPget

From wikinotes
Revision as of 15:55, 6 October 2014 by Will (talk | contribs) (Created page with "= ~/.xmonad/Extensions/externalIPget = <pre> chown will:will externalIPget chmod 755 externalIPget </pre> <pre> #!/bin/sh # # Description: # Called by rootstart.service (s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

~/.xmonad/Extensions/externalIPget

chown will:will externalIPget
chmod 755 externalIPget


#!/bin/sh
#
# Description:
# Called by rootstart.service (systemd) after network connection has been established.
# Gets external IP address, and saves it with an echo to the file externalIP which is called by Conky.

# *** NOTE before using this script, you must create a file in this directory called: externalIP 
# and chmod755 it



echo "echo " $(wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//' ) > /home/will/.xmonad/Extensions/externalIP