I started by appending my script to the wan-start below the ab-solution portion. The script is, just a sleep event to ensure the WAN is active, and then issue a pushover notification.
Is that the desired approach, to append to the existing script ?
Is there somewhere I could actually specify my individual script to be called ? So it could reside as itself in the scripts folder. I am unsure if appending to the wan-start script would cause issues in general or after updates from ab-solution. Mainly just making sure I don't muck anything up.
I started by appending my script to the wan-start below the ab-solution portion. The script is, just a sleep event to ensure the WAN is active, and then issue a pushover notification.
Is that the desired approach, to append to the existing script ?
Is there somewhere I could actually specify my individual script to be called ? So it could reside as itself in the scripts folder. I am unsure if appending to the wan-start script would cause issues in general or after updates from ab-solution. Mainly just making sure I don't muck anything up.
Thats where I was, most of the afternoon and half the evening, reading, a little scratching my head too.
I also thought about the 2nd comment you made (calling from the other script) so yeah I was thinking along the correct lines. I’ll go that route I think.
I was wondering if one of you more experienced scripting folks could look over my script. I am at a loss to explain why it fails. Maybe I have it placed in the wrong location to get called properly.
1. Pushover notification, script variation used for years on my Mac. Script to be used when I am working remotely and be notified of services start up after a reboot.
2. Works time and again on the Mac. As a saved script.
3. My script is placed in /jffs/scripts/ and chmod a+rx (per wiki)
4. My script is called from wan-start, single line call (Placed after ab-solution and before dnscrypt, or even after dnscrypt
Code:
sh notifyme
5. Working manually when calling the actual script on the router or even calling wan-start on the router.
Code:
From /jffs/scripts/
. notifyme = success
. wan-start = success
6. Script seems to time out on the router ? During a reboot and FAILS every time. Reboots from the GUI or through ssh are the same, and end in the same failure.
-- No log created
7. I am able to turn off Net access and run the script (on my Mac), then come back approximately 10 minutes later, re-enable net access and the script will succeed.
Code:
Sun Apr 15 11:59:39 EDT 2018 script start
Sun Apr 15 11:59:40 EDT 2018 script complete
Sun Apr 15 12:00:13 EDT 2018 script start
Sun Apr 15 12:00:13 EDT 2018 script complete
Sun Apr 15 12:00:15 EDT 2018 script start
Sun Apr 15 12:00:16 EDT 2018 script complete
Sun Apr 15 12:00:17 EDT 2018 script start
Sun Apr 15 12:00:17 EDT 2018 script complete
Sun Apr 15 12:01:54 EDT 2018 script start
Sun Apr 15 12:13:05 EDT 2018 script complete
8. I am using TextWrangler to create the script and saved as unix file type on my Mac. Script is created using nano on the router and saved.
9. Even though the script succeeds when ran manually, I have tried the dos2unix command on the script with no noticeable effect.
9. Running scripts/processes on RT-AC5300, are in my signature
Lastly I have not been able to get the "logger" command to work any guidance on how to use it. When I attempt to use it, the script just hangs. So I know this is very likely user error.
Thanks for any thoughts or hints that you can provide me.
Will merlins f/w do a job consisting of "@reboot sleep 60 && my_script.sh"? I gave it a few go's tonight but it was no luck from what I could tell. Ill try to pipe it into a log file tomorrow. But you all may be able to save me a bit of work.
I cant tell yet if its my error or it will not run with the @reboot portion. I can call and run my_script fine from something like firewall-start. So its not the script and I already have a script to re add the job at each boot so thats not the issue either.
Will merlins f/w do a job consisting of "@reboot sleep 60 && my_script.sh"? I can call and run my_script fine from something like firewall-start. So its not the script and I already have a script to re add the job at each boot so thats not the issue
Thanks for the thoughts. I’ve been using firewall-start so Skynet AB solution etc are all up. Running my script as a separate process so as not to slow down other things on the router.
It’s working great. It’s acutally running twice but only rarely. Sleeping for circa 4 min to allow services to start and settle down to normal. Then checking a ping to ensure connectivity. Finally sends a push notification with wan ip to my phone.
Mainly script was to be used if traveling to let me know VPNs up etc. WAN was a bonus I added at the last minute.
Just means I need to teach myself a little more and put a few more checks into my script.
Oh well more learning. That’s a good thing. You all have already. Helped me learn more than I thought I would. It’s not really as hard as I always led myself to believe. But again I’m no where near your level. I’m still learning to crawl about.
That rare double run irritates me, yeah touch of ocd here. But again I’ve been having some fun learning the last few weeks. Especially after recovering from a few blunders.
I’m using the dnsomatic scripts for several services and the asus ddns as well but just had to send the push with WAN to myself because I could
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!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.