From 4fa79ce8fe82c4ae2b0fa117864e30664ea4500e Mon Sep 17 00:00:00 2001 From: pocki80 Date: Mon, 15 Oct 2018 13:43:25 +0200 Subject: [PATCH] fix watchdog cron.d-entry creation from within init.d script --- wizard-run | 6 +++--- wizard.html | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wizard-run b/wizard-run index 7e4c713..f02c5fc 100644 --- a/wizard-run +++ b/wizard-run @@ -2,7 +2,7 @@ # # EdgeMAX Wizard "OLSRd_V1" created 03/2016 by Onetrix.net for FunkFeuer.at -# Version [0903k/201810150] +# Version [0903k/20181015] # ^-- previous line is used from bmk-webstatus-package as version identification, dont remove "Version " # # Github repository: https://github.com/vchrizz/ER-wizard-OLSRd_V1/ @@ -400,7 +400,7 @@ if [ -f $olsrd4init ] && [ $(grep -c "rm /etc/cron.d/olsrdwatchdog" $olsrd4init) linenumber=$(($(grep -n 'start-stop-daemon --start --quiet' $olsrd4init | tail -n1 | cut -d":" -f1)+5)) sed -i $linenumber'i\ if [ ! -f /etc/cron.d/olsrdwatchdog ] &&\ - [ -f /etc/default/olsrd ] && [ $(cat /etc/default/olsrd | cut -d "#" -f 1 | grep -c ''START_OLSRD=\"YES\"'') \\> 0 ] &&\ + [ -f /etc/default/olsrd ] && [ $(cat /etc/default/olsrd | cut -d "#" -f 1 | grep -c '"'"'START_OLSRD=\"YES\"'"'"') \\> 0 ] &&\ [ $(cat /config/user-data/olsrd4.conf | cut -d "#" -f 1 | grep -c LoadPlugin.*olsrd_watchdog) \\> 0 ] &&\ [ -x /etc/olsrdwatchdog ] ; then\ echo "* * * * * root /etc/olsrdwatchdog >/dev/null 2>/dev/null" >/etc/cron.d/olsrdwatchdog\ @@ -19586,7 +19586,7 @@ UG=$(echo $(id -un):$(id -u) "("$(id -gn):$(id -g)")")' $olsrd4init linenumber=$(($(grep -n 'start-stop-daemon --start --quiet' $olsrd4init | tail -n1 | cut -d":" -f1)+5)) sed -i $linenumber'i\ if [ ! -f /etc/cron.d/olsrdwatchdog ] &&\ - [ -f /etc/default/olsrd ] && [ $(cat /etc/default/olsrd | cut -d "#" -f 1 | grep -c ''START_OLSRD=\"YES\"'') \\> 0 ] &&\ + [ -f /etc/default/olsrd ] && [ $(cat /etc/default/olsrd | cut -d "#" -f 1 | grep -c '"'"'START_OLSRD=\"YES\"'"'"') \\> 0 ] &&\ [ $(cat /config/user-data/olsrd4.conf | cut -d "#" -f 1 | grep -c LoadPlugin.*olsrd_watchdog) \\> 0 ] &&\ [ -x /etc/olsrdwatchdog ] ; then\ echo "* * * * * root /etc/olsrdwatchdog >/dev/null 2>/dev/null" >/etc/cron.d/olsrdwatchdog\ diff --git a/wizard.html b/wizard.html index 3af72b2..69e7115 100644 --- a/wizard.html +++ b/wizard.html @@ -2,9 +2,9 @@ EdgeMAX Wizard "OLSRd_V1" created 03/2016 by Onetrix.net for FunkFeuer.at Works on EdgeRouter and EdgeRouter X / X-SFP (system version 1.7.0+) -versioninfo=201810150 +versioninfo=201810151 ^-- use version identifier as number: YYYYMMDDX whereas X can be intraday-version -autoupdate=201810090 +autoupdate=201810151 ^-- set autoupdate the same version identifier to allow autoupdates -->