summaryrefslogtreecommitdiff
path: root/dwm/Scripts/net.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dwm/Scripts/net.sh')
-rw-r--r--dwm/Scripts/net.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/dwm/Scripts/net.sh b/dwm/Scripts/net.sh
new file mode 100644
index 0000000..d443091
--- /dev/null
+++ b/dwm/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