What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Graceful Shutdown

Aster5

New Around Here
Hello, can I ask how you guys can gracefully shutdown your asus router? I can create a script to stop the optware services and unmount the drives but my problem is that I have to ssh to the router everytime to do that. Is there any way to maybe possibly insert/edit the main interface of asus merlin FW so I can just push a button to start the script?
 
Hello, can I ask how you guys can gracefully shutdown your asus router? I can create a script to stop the optware services and unmount the drives but my problem is that I have to ssh to the router everytime to do that. Is there any way to maybe possibly insert/edit the main interface of asus merlin FW so I can just push a button to start the script?

Add your script to the services-stop script in /jffs/scripts

https://github.com/RMerl/asuswrt-merlin/wiki/User-scripts
 
Yeah but that only applies to a boot/reboot.

What I'm trying to do is a graceful shutdown of the router (stop services + unmount) and not going through ssh/telnet every time to do that.
 
Hello, can I ask how you guys can gracefully shutdown your asus router? I can create a script to stop the optware services and unmount the drives but my problem is that I have to ssh to the router everytime to do that.

Code:
# cat /jffs/scripts/services-stop
#!/bin/sh

logger -t $(basename $0) "started [$@]"

/opt/etc/init.d/rc.unslung stop
Firmware will unmount any partitions before reboot, no need to do it manually.
 
I think there's no way around it than just install lighttpd and run the script from there... :rolleyes:

Try -m option in Putty's command line.
You can make a proper .lnk file to execute Putty, to connect to your router and to execute a script there.
See Putty's help.

It will be something like:
Code:
"C:\Tools\SSH\Putty\putty.exe" -ssh -P 5555 [email]admin@bla-bla.noip.me[/email] -i router.ppk -m myscript.txt
Here we assume myscript.txt and router.ppk to be in C:\Tools\SSH\Putty\ of course.
 
Last edited:
Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top