Thanks a lot for posting this! I do have one issue, I can't seem to run the showwebmon.sh script as a script. If I enter the commands from showwebmon.sh one line at a time, including the while loop, I do get the same output you show in your example. However, I am not able to execute the script itself.
Here is what I get when I try to run the script:
Code:admin01@RT-AC68U-2D18:/jffs/scripts# ls -l -rwxr-xr-x 1 admin01 root 304 Mar 15 10:33 firewall-start -rwxr-xr-x 1 admin01 root 448 Mar 15 11:38 showwebmon.sh admin01@RT-AC68U-2D18:/jffs/scripts# showwebmon.sh -sh: showwebmon.sh: not found admin01@RT-AC68U-2D18:/jffs/scripts# /jffs/scripts/showwebmon.sh -sh: /jffs/scripts/showwebmon.sh: not found admin01@RT-AC68U-2D18:/jffs/scripts# sh showwebmon.sh ': No such file or directoryn_recent_domains showwebmon.sh: line 12: syntax error: unexpected "done" (expecting "do") admin01@RT-AC68U-2D18:/jffs/scripts#
I'm not sure what the problem is because the commands do work when typed in manually. In the router's config I have jffs enabled as well as "enable jffs custom scripts and configs". I must be overlooking something obvious. Any ideas?
The execution path ($PATH) doesn't include the /jffs/scripts/ folder.
If you have /jffs/scripts/ as the current folder, try typing ./showwebmon.sh as that should work.
The error you got when using "sh showwebmon.sh" looks like a syntax error in the script itself; perhaps an extra line feed or carriage control. What editor did you use to create the script? What does the script look like when you "cat showwebmon.sh"?
Last edited: