What's new

Script to auto reboot AiMesh system

  • 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!

You'll need to add a cron job since the UI isn't available. Adding a cron job is fairly straightforward, and done by ssh.

Here's an overview of the steps (if Merlin is on the node) from memory - others will correct me if I've missed anything:

  • Connect to the mesh node by ssh using the mesh IP address.
  • Navigate to the /jffs/scripts folder. If that folder doesn't exist, create it and navigate to it.
  • Using nano or vi, edit or create a script called init-start or services-start.
  • Inside that file, put the shebang #!/bin/sh on the first line and then a line that calls the reboot at a certain time each day, e.g., cru a daily_reboot "59 23 * * * /sbin/reboot"
  • Save the file.
  • Make sure the file is executable chmod +x filename.
  • Either execute the script sh -x filename (the -x will show you verbose output to see if it works) or reboot the router.
  • At the ssh prompt, type cru l (lower case L - el) and you should see the cron job scheduled for 23:59 each day.
If you're running Asus official on the node, it's a bit more complicated. You may find what you want here: https://github.com/jacklul/asuswrt-scripts (note: I found this site by searching, I have not evaluated anything suggested by this githuber). Otherwise:
 
This worked on test. Unfortunately after reboot the node doesn't reconnect to the AiMesh system. I started a new post for that as it doesn't reconnect no matter how I reboot the node except AiMesh: System Settings: System Reboot. Which is actually what I'd like to do through a cron so that it reboots the whole system.
 
Last edited:
FWIW, I run an AIMesh setup with an RT-AX86U Pro primary router (running Merlin 3004.388.4) and an RT-AC86U mesh node (running stock ASUS 3.0.0.4.386.51915). The primary router is configured for periodic reboot via the UI. This seems to be sufficient to reboot the mesh node as well, since both devices report nearly identical "uptime" values if I ssh into them. IIRC, this wasn't my experience with earlier firmware versions, but perhaps ASUS had improved the mesh behavior since then.
 
Last edited:

Similar threads

Latest 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!
Top