ansible.fftdf.supernode/files/keepalive.exit.sh.j2
2016-01-27 00:15:32 +01:00

11 lines
202 B
Django/Jinja

#!/bin/bash
ping -q -I {{ sn_ffrl_IPv4 }} 8.8.8.8 -c 4 -i 1 -W 5 >/dev/null 2>&1
if test $? -eq 0; then
/usr/local/sbin/batctl gw server 100Mbit/100Mbit
else
/usr/local/sbin/batctl gw off
fi