mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
fixed status update if nothing was done
This commit is contained in:
parent
69c043fefb
commit
a2ffb64996
@ -172,6 +172,7 @@ case $cmd in
|
|||||||
if [ "$OLDIP" != "$WANIP" -a "${WANIP}" != ${NOIP} ];then
|
if [ "$OLDIP" != "$WANIP" -a "${WANIP}" != ${NOIP} ];then
|
||||||
${UPDATE_TOOL} -c $FILE
|
${UPDATE_TOOL} -c $FILE
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
|
[ $RESULT -eq 0 ] && $0 success
|
||||||
cat /proc/uptime |awk '{print $1}' |cut -d . -f 1 > $LASTUPDATE
|
cat /proc/uptime |awk '{print $1}' |cut -d . -f 1 > $LASTUPDATE
|
||||||
fi
|
fi
|
||||||
#if we don't know our WAN IP do a blind update once a hour
|
#if we don't know our WAN IP do a blind update once a hour
|
||||||
@ -183,12 +184,11 @@ case $cmd in
|
|||||||
if [ $DIFF -gt $UPDATEMINUTESUNKNOWN ];then
|
if [ $DIFF -gt $UPDATEMINUTESUNKNOWN ];then
|
||||||
${UPDATE_TOOL} -c $FILE
|
${UPDATE_TOOL} -c $FILE
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
|
[ $RESULT -eq 0 ] && $0 success
|
||||||
cat /proc/uptime |awk '{print $1}' |cut -d . -f 1> $LASTUPDATE
|
cat /proc/uptime |awk '{print $1}' |cut -d . -f 1> $LASTUPDATE
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ $RESULT -eq 0 ];then
|
if [ $RESULT -ne 0 ];then
|
||||||
$0 success
|
|
||||||
else
|
|
||||||
$0 failed
|
$0 failed
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user