contrib/freifunk-gwcheck: Improve uci-defaults
[project/luci.git] / contrib / package / freifunk-gwcheck / root / etc / uci-defaults / freifunk-gwcheck
1 #!/bin/sh
2 tables="/etc/iproute2/rt_tables"
3 [ -z "`grep -q "gw-check" $tables`" ] && echo "200 gw-check" >> $tables
4 test -f /etc/crontabs/root || touch /etc/crontabs/root
5 [ -z "`grep -q "ff_olsr_test_gw.sh" /etc/crontabs/root`" ] && echo "* * * * *   /usr/sbin/ff_olsr_test_gw.sh" >> /etc/crontabs/root
6 /etc/init.d/cron restart