X-Git-Url: https://code.delx.au/monosys/blobdiff_plain/f0033707602ef1a675f71b1609a8cda3522c9ef9..02bac4f297ff6ec3f55278372cae905d0bd812bc:/hacks/fix-openwrt-hairpin diff --git a/hacks/fix-openwrt-hairpin b/hacks/fix-openwrt-hairpin index 9403ffe..7428461 100755 --- a/hacks/fix-openwrt-hairpin +++ b/hacks/fix-openwrt-hairpin @@ -1,8 +1,11 @@ #!/bin/bash -AP_HOSTS="$(awk '/^Host.*openwrt/ {print $2}' < ~/.ssh/config)" +# /etc/crontabs/root +# m h dom mon dow command +# * * * * * /root/fix-openwrt-hairpin -for host in $AP_HOSTS; do - ssh "$host" 'for f in /sys/devices/virtual/net/*/*wlan*/brport/hairpin_mode; do [ -f $f ] && echo 1 > "$f"; done' +for f in /sys/devices/virtual/net/*/*wlan*/brport/hairpin_mode; do + if [ -f $f ]; then + echo 1 > "$f" + fi done -