execute command on wifi nodes and generate /dev/shm/wap
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 22 Apr 2018 08:54:04 +0000 (10:54 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 22 Apr 2018 08:54:04 +0000 (10:54 +0200)
wap-alive.sh [new file with mode: 0755]
wap-ssh.sh [new file with mode: 0755]

diff --git a/wap-alive.sh b/wap-alive.sh
new file mode 100755 (executable)
index 0000000..06d2c7d
--- /dev/null
@@ -0,0 +1,2 @@
+grep '^\[wifi.ffzg;wap-' /etc/munin/munin.conf | cut -d\; -f2 | cut -d \] -f1 | xargs fping -a | grep -v wap-dekanat
+
diff --git a/wap-ssh.sh b/wap-ssh.sh
new file mode 100755 (executable)
index 0000000..be593ae
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+log=/dev/shm/wap
+test -d $log || mkdir $log
+file=`echo $* | sed 's/  */_/g'`
+ssh -i /home/dpavlin/.ssh/wifiadmin -o StrictHostKeyChecking=no root@$* | tee $log/$file