One way is to install Entware (which is good to have by itself anyway).
Then make good use of init.d in Entware. Look at /opt/etc/init.d. Depends on your scripts, most likely you'll need helpers (which available from Entware as well). I've been doing this for years...happily.
Thanks for this excellent exemple. I will have a deeper look, but I thought I could achieve the same result with init.dOr just make your script make use of lockfile in order for you to stop/restart process. It's pretty simple. Something like https://github.com/Meliox/FTPauto/blob/master/utils/networkmonitor.sh should be doable. And of cause add it to the startup scripts: https://github.com/RMerl/asuswrt-merlin/wiki/User-scripts
Could you tell me which helpers I should consider ?
Welcome To SNBForums
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!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!