mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
added comment lines
This commit is contained in:
parent
b782f36b28
commit
875c24e213
@ -240,15 +240,19 @@ case ${cmd} in
|
|||||||
;;
|
;;
|
||||||
start)
|
start)
|
||||||
if [ "$(cat $HELPERCFG |grep ^NAT | awk '{print $2}')" = "no" ];then
|
if [ "$(cat $HELPERCFG |grep ^NAT | awk '{print $2}')" = "no" ];then
|
||||||
|
#if we are not behind a NAT device and we use gnudip, start the daemon tool
|
||||||
if [ -f ${CFG} -a ! -z $(cat ${cfgfile} 2> /dev/null |grep server |cut -d = -f 2 |grep -v ^\'\')];then
|
if [ -f ${CFG} -a ! -z $(cat ${cfgfile} 2> /dev/null |grep server |cut -d = -f 2 |grep -v ^\'\')];then
|
||||||
mv ${CFG_disabled} ${CFG}
|
mv ${CFG_disabled} ${CFG}
|
||||||
/etc/init.d/${TOOLNAME} start
|
/etc/init.d/${TOOLNAME} start
|
||||||
fi
|
fi
|
||||||
|
#if we are not behind a NAT device and we use update-URL, add a cronjob
|
||||||
|
#(daemon tool does not support update-URL feature)
|
||||||
if [ ! -z $(cat $HELPERCFG |grep ^POSTURL | awk '{print $2}') ];then
|
if [ ! -z $(cat $HELPERCFG |grep ^POSTURL | awk '{print $2}') ];then
|
||||||
echo "*/${UPDATEMINUTES} * * * * root $0 update" > ${CRONJOB}
|
echo "*/${UPDATEMINUTES} * * * * root $0 update" > ${CRONJOB}
|
||||||
$0 update
|
$0 update
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
#if we are behind a NAT device, add a cronjob (daemon tool cannot monitor WAN IP changes)
|
||||||
echo "*/${UPDATEMINUTES} * * * * root $0 update" > $CRONJOB
|
echo "*/${UPDATEMINUTES} * * * * root $0 update" > $CRONJOB
|
||||||
$0 update
|
$0 update
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user