From cb52d7fcf076f1974bf4ed0f5d1e842d5fd2f4d6 Mon Sep 17 00:00:00 2001 From: Daniel Steglich Date: Mon, 5 Jan 2015 16:20:28 +0000 Subject: [PATCH] do not report errors on first run --- actions/dynamicdns | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/actions/dynamicdns b/actions/dynamicdns index b6123296c..8fb8d1ef4 100755 --- a/actions/dynamicdns +++ b/actions/dynamicdns @@ -90,8 +90,8 @@ doWriteCFG() #reset the last updated IP echo "0.0.0.0" > $IPFILE - #reset last update - rm $STATUSFILE + #reset last update (if there is one) + rm $STATUSFILE 2> /dev/null #find the interface (always the default gateway interface) DEFAULT=`ip route |grep default |awk '{print $5}'` @@ -128,7 +128,7 @@ doWriteCFG() doGetWANIP() { - if [ $IPURL ];then + if [ ! -z $IPURL ];then OUTFILE=`mktemp` wget -4 -o /dev/null -O $OUTFILE $IPURL WANIP=`cat $OUTFILE`