Testing router on reboot


I was wondering if turris OS makes it possible to implement a testing script for my home network that runs on reboot. I am using the wifi, openvpn, and various other things I can’t remember now. Currently I have to manually test these services work after an update, and sometimes I forget. I would be happy to automate them, but I don’t know how/where the script should live and be invoked to avoid being overwritten or otherwise disrupted when turris updates happen. So, I guess, if there exists a folder that doesn’t get touched that I can store my testing script, that would work.


I think you can add the script to /etc/rc.d and it will be run. I’d name it S99Zsomething so that it runs as the last one. Also, it’s usually a good manner to actually put the script in /etc/init.d and put only a symlink to it to /etc/rc.d.

Thanks! Now I need to figure out how to effectively test OpenVPN, my internet connection and wifi. Any suggestions where I can find those commands?

That completely depends on how define “test internet”, “test wifi” etc. If you have an always-on device on wifi, you can try pinging it. Regarding internet, you can try pinging some well known address (or host to test also DNS resolution). OpenVPN should create a device (someting like tap0 or tun0), so might check if this device exists and has the expected address (ip ro can help here).