I'm trying to set up @Martineau Chk-WAN script on my Asus Merlin router. I followed the install instructions, and all seemed to go as planned. My challenge is that I don't think it is actually running correctly.
I thought by typing "./ChkWAN.sh cron" that it would install it into crontab. When I run that command, it seems to do just that, but upon reboot, when I type "cru l", it is not in the list.
Here is what I have tried
=====================================================================
cru l
13 9 */7 * * service restart_letsencrypt #LetsEncrypt#
=====================================================================
OK - no entry there, so proceed to the command I think should add it...
=====================================================================
./ChkWAN.sh cron
ChkWAN scheduled by cron
*/30 * * * * /jffs/scripts/ChkWAN.sh wan nowait once #WAN_Check#
(ChkWAN.sh): 5314 v1.17 WAN connection status monitoring will begin in 10 seconds.....
(ChkWAN.sh): 5314 v1.17 Monitoring WAN connection using 5 target PING hosts (192.168.12.1 94.140.14.15 94.140.15.16 9.9.9.9 1.1.1.1) (Tries=3)
(ChkWAN.sh): 5314 Monitoring pass 1 out of 3
(ChkWAN.sh): 5314 Private LAN 192.168.12.1 will be skipped for WAN PING check!
(ChkWAN.sh): 5314 Monitoring WAN connection OK.....(Successful ping to '94.140.14.15'); Terminating due to ACTIVE cron schedule
======================================================================
NOTE: Not sure if the "Terminating due to ACTIVE cron schedule" above is an error, or just information?
ALSO: 192.168.12.1 (above) is my t-mobile router/gateway - the ASUS router is behind that - does the note above about skipping 192.168.12.1 indicate that it is not checking that route at all? (that is my path to the internet)
my setup looks like this: ASUS (192.168.12.2) -> T-Mo Gateway (192.168.12.1) -> iNet (public IP)
If it is skipping this route altogether, is there a way to force it to use that? (I don't think it is skipping, as last line says "WAN connection OK", but wanted to check...
======================================================================
If I subsequently type "cru l", I get:
13 9 */7 * * service restart_letsencrypt #LetsEncrypt#
*/30 * * * * /jffs/scripts/ChkWAN.sh wan nowait once #WAN_Check#
======================================================================
So it looks like the cron job has been added, but if I type "./ChkWAn.sh status", it says:
(ChkWAN.sh): 6379 v1.17 Check WAN monitor not running
And then if I reboot the router, it is back to not having ChkWAN in the "cru l" list again... :S
I can edit my init-start file so that it adds the cron job every reboot, but even then, if I type "./ChkWAN status", it says it is not running. Does that mean it's not *currently running, or does it mean that there is something wrong with the cron job?
Thank you for any help - I appreciate it!
-randy
I thought by typing "./ChkWAN.sh cron" that it would install it into crontab. When I run that command, it seems to do just that, but upon reboot, when I type "cru l", it is not in the list.
Here is what I have tried
=====================================================================
cru l
13 9 */7 * * service restart_letsencrypt #LetsEncrypt#
=====================================================================
OK - no entry there, so proceed to the command I think should add it...
=====================================================================
./ChkWAN.sh cron
ChkWAN scheduled by cron
*/30 * * * * /jffs/scripts/ChkWAN.sh wan nowait once #WAN_Check#
(ChkWAN.sh): 5314 v1.17 WAN connection status monitoring will begin in 10 seconds.....
(ChkWAN.sh): 5314 v1.17 Monitoring WAN connection using 5 target PING hosts (192.168.12.1 94.140.14.15 94.140.15.16 9.9.9.9 1.1.1.1) (Tries=3)
(ChkWAN.sh): 5314 Monitoring pass 1 out of 3
(ChkWAN.sh): 5314 Private LAN 192.168.12.1 will be skipped for WAN PING check!
(ChkWAN.sh): 5314 Monitoring WAN connection OK.....(Successful ping to '94.140.14.15'); Terminating due to ACTIVE cron schedule
======================================================================
NOTE: Not sure if the "Terminating due to ACTIVE cron schedule" above is an error, or just information?
ALSO: 192.168.12.1 (above) is my t-mobile router/gateway - the ASUS router is behind that - does the note above about skipping 192.168.12.1 indicate that it is not checking that route at all? (that is my path to the internet)
my setup looks like this: ASUS (192.168.12.2) -> T-Mo Gateway (192.168.12.1) -> iNet (public IP)
If it is skipping this route altogether, is there a way to force it to use that? (I don't think it is skipping, as last line says "WAN connection OK", but wanted to check...
======================================================================
If I subsequently type "cru l", I get:
13 9 */7 * * service restart_letsencrypt #LetsEncrypt#
*/30 * * * * /jffs/scripts/ChkWAN.sh wan nowait once #WAN_Check#
======================================================================
So it looks like the cron job has been added, but if I type "./ChkWAn.sh status", it says:
(ChkWAN.sh): 6379 v1.17 Check WAN monitor not running
And then if I reboot the router, it is back to not having ChkWAN in the "cru l" list again... :S
I can edit my init-start file so that it adds the cron job every reboot, but even then, if I type "./ChkWAN status", it says it is not running. Does that mean it's not *currently running, or does it mean that there is something wrong with the cron job?
Thank you for any help - I appreciate it!
-randy