summaryrefslogtreecommitdiff
path: root/i3/Scripts/net.sh
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2019-07-08 20:41:25 +0200
committerJulian T <julian@jtle.dk>2019-07-11 15:58:26 +0200
commite40d0e1f047fa7f6d135154e59aea0b7e72184e3 (patch)
tree6b5fe89d4dfdf8cc2ff08090a454f4b59925e1be /i3/Scripts/net.sh
parentb1c51c990a80e98f3d6a36f44ac00bf1b1273a35 (diff)
Added i3wm config
Diffstat (limited to 'i3/Scripts/net.sh')
-rw-r--r--i3/Scripts/net.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/i3/Scripts/net.sh b/i3/Scripts/net.sh
new file mode 100644
index 0000000..d443091
--- /dev/null
+++ b/i3/Scripts/net.sh
@@ -0,0 +1,19 @@
+PIDFILE=/tmp/statNet.pid
+STATUSFILE=/tmp/dsbANet
+
+kill `cat $PIDFILE`
+if [ $? -eq 0 ]; then
+ echo "Shutting down"
+ rm $STATUSFILE
+ exit
+fi
+
+echo $$ > $PIDFILE
+
+while true; do
+
+ IP=$( ip -4 a | grep "inet " | sed "s:inet \(.*\)/.*:\1:" | tr -d " " | grep -v "0.1" | tr "\n" " ")
+
+ echo "$IP " > $STATUSFILE
+ sleep 10
+done