I don't know what you expect here... Running that command over SSH takes about 5 seconds, including the login time.
@RMerlin
it's not the command launch and the login, that's is automated.
is the service wan stop and start that take a few seconds itself.
I just wanted to know if there is a command to make faster renew of wan ip.
@merlin
Thank you for the great firmware, it solved already some problems for me. Having the need to reset my internet connection daily i wonder if there is another way than reboot the router via script...
Is there any chance to reset WAN as well if it is connected via USB key Modem?
Beside that, is there a list for <action_service> for the service command?
Thanx
teefix
does ASUSWRT Merlin supports cron?
Can I create "service restart_wan" script to be run everyday at 5:00 AM ?
Persistent JFFS2 partition
Enable JFFS partition: Yes
Format JFFS partition at next boot: No
Enable JFFS custom scripts and configs: Yes
#!/bin/sh
cru a ScheduledReboot "0 4 * * * /sbin/reboot"
chmod a+rx /jffs/scripts/*
#!/bin/sh
cru a ScheduledReboot "0 4 * * * /sbin/service restart_wan"
#!/bin/sh
mojaIP=`nvram show | grep -e "wan_ipaddr=" | cut -f2 -d"="`
zacina=${mojaIP:0:3}
while true; do
if [ "$zacina" == "100" ]; then
service restart_wan
mojaIP=`show | grep -e "wan_ipaddr=" | cut -f2 -d"="`
zacina=${mojaIP:0:3}
fi
sleep 60
done
#!/bin/sh
CYKLON=0
while [ "$CYKLON" = "0" ]
do
MYIP=$(ifconfig ppp0 | grep 'inet addr' | awk '{print(substr($2,6))}')
GRIP=$(echo "$MYIP" | cut -d . -f1)
let "GRIP += 1"
if [ $GRIP -eq 1 ]; then
logger "!!!...Connect DOWN..service restart_wan........!!!"
service restart_wan
exit 0
sleep 60 #not work exit 0 - exit script
else
logger "!!!...Connect UP..WAN IP adress $MYIP......!!!"
fi
MYIP=$(ifconfig ppp0 | grep 'inet addr' | awk '{print(substr($2,6))}')
logger "!!!...WAN IP adress $MYIP"
GRIP=$(echo "$MYIP" | cut -d . -f1)
let "GRIP += 1"
if [ $GRIP -eq 11 ]; then
CYKLON=0
logger "!!!..WAN IP adress 10.x.x.x..service restart_wan...!!!"
service restart_wan
exit 0
sleep 60
else
CYKLON=1
logger "!!!...WAN IP adress OK!!!..test_1...!!!"
fi
if [ $GRIP -eq 101 ]; then
CYKLON=0
logger "!!!..WAN IP adress 100.x.x.x..service restart_wan...!!!"
service restart_wan
exit 0
sleep 60
else
CYKLON=1
logger "!!!...WAN IP adress OK!!!..test_2...!!!"
fi
logger "!!!...WAN IP adress $MYIP!!!..services start..!!!"
#ntpclient -h $(nvram get ntp_server0) -i 3 -l -s
#/opt/etc/init.d/S29udpxy restart
#logger "!!!...System time update and udpxy services restart OK!!!....!!!"
done
#/jffs/scripts/he-net.sh
#logger "!!!...Update IP http://he.net OK!!!....!!!"
exit 0
#!/bin/sh
sleep 60
/jffs/scripts/name_your_script.sh
CYKLON=0
while [ "$CYKLON" = "0" ]
do
MYIP=$(ifconfig ppp0 | grep 'inet addr' | awk '{print(substr($2,6))}')
GRIP=$(echo "$MYIP" | cut -d . -f1)
let "GRIP += 1"
if [ $GRIP -eq 1 ]; then
logger "!!!...Connect DOWN..service restart_wan........!!!"
service restart_wan
exit 0
sleep 60 #not work exit 0 - exit script
else
logger "!!!...Connect UP..WAN IP adress $MYIP......!!!"
fi
MYIP=$(ifconfig ppp0 | grep 'inet addr' | awk '{print(substr($2,6))}')
if [ $GRIP -eq 101 ]; then
CYKLON=0
logger "!!!..WAN IP adress 100.x.x.x..service restart_wan...!!!"
service restart_wan
exit 0
sleep 60
else
CYKLON=1
fi
logger "!!!...WAN IP adress $MYIP....!!!"
done
exit 0
chmod a+rx /jffs/scripts/*
Hi WAN-Connect-Pros
Could please anyone help me in that case? http://www.snbforums.com/forums/asus-wireless.37/
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!