From c4f19cbfd436b456c47a10ec22ae1cc09768f1a1 Mon Sep 17 00:00:00 2001 From: Manuel Munz Date: Fri, 23 Sep 2011 19:27:23 +0000 Subject: [PATCH] contrib/freifunk-gwcheck: Improve uci-defaults --- .../freifunk-gwcheck/root/etc/uci-defaults/freifunk-gwcheck | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/package/freifunk-gwcheck/root/etc/uci-defaults/freifunk-gwcheck b/contrib/package/freifunk-gwcheck/root/etc/uci-defaults/freifunk-gwcheck index e7fc9888e..e0574e640 100644 --- a/contrib/package/freifunk-gwcheck/root/etc/uci-defaults/freifunk-gwcheck +++ b/contrib/package/freifunk-gwcheck/root/etc/uci-defaults/freifunk-gwcheck @@ -1,5 +1,6 @@ #!/bin/sh tables="/etc/iproute2/rt_tables" -[ -z "`grep "gw-check" $tables`" ] && echo "200 gw-check" >> $tables -[ -z "`grep "ff_olsr_test_gw.sh" /etc/crontabs/root`" ] && echo "* * * * * /usr/sbin/ff_olsr_test_gw.sh" >> /etc/crontabs/root +[ -z "`grep -q "gw-check" $tables`" ] && echo "200 gw-check" >> $tables +test -f /etc/crontabs/root || touch /etc/crontabs/root +[ -z "`grep -q "ff_olsr_test_gw.sh" /etc/crontabs/root`" ] && echo "* * * * * /usr/sbin/ff_olsr_test_gw.sh" >> /etc/crontabs/root /etc/init.d/cron restart -- 2.25.1