View Single Post
Staro 08.03.2017., 10:07   #36
MasterX
do you speak it?
 
Datum registracije: Mar 2003
Lokacija: ::1
Postovi: 1,629
Citiraj:
Autor The AC Pregled postova
Prije nego iskeširaš za novi router možeš probati još sa ovim.
Spojiš router na njega i namjestiš da se svaki put u rane jutarnje sate ugasi i upali.
to je OK, ali je to low-level pristup rjesavanju problema

u MerlinFW mozes podesiti reconnect script da se vrti u odredjeno vrijeme i problem je puno elegantnije rijesen

Citiraj:
Advanced Settings - Administration - System

Persistent JFFS2 partition
Enable JFFS partition: Yes
Format JFFS partition at next boot: No
Enable JFFS custom scripts and configs: Yes

APPLY

1. telnet or SSH to your router
2. cd /
3. cd /jffs/scripts
4. vi init-start
5. press INSERT
6. paste this code
Code:

Code:
#!/bin/sh
cru a ScheduledReboot "0 4 * * * /sbin/reboot"
7. press ESCAPE
8. type ":wq" (write quit)
9. paste this code (set scripts as executable)
Code:

Code:
chmod a+rx /jffs/scripts/*
10. reboot


if you want WAN Reconnect script, but not reboot, just change step 6 with this code:
Code:

Code:
#!/bin/sh
cru a ScheduledWANRestart "0 3 * * * /sbin/service restart_wan"
this short tutorial should be bullet proof, I have just tested it on two ASUS routers with Merlin firmware version: 378.53

if you want to double check, telnet or SSH to your router
go to /jffs/scripts
ls - to check if script is really there
cru l - you should see your job scheduled in the cron list
__________________
Drinking Rum before 10am makes you a Pirate, not an Alcoholic.

Zadnje izmijenjeno od: MasterX. 08.03.2017. u 11:35.
MasterX je offline   Reply With Quote