These scripts can modify configuration by starting additional services and more.
The standard scripts are:
/etc/persistent/rc.prestart /etc/persistent/rc.poststart /etc/persistent/rc.prestop /etc/persistent/rc.poststopThey are called before and after the standard boot and shutdown scripts start or stop services...
Add static route via script
- Reboot devices to clean all static routes and access via SSH/Telnet to AirOS device
- Create a script /etc/persistent/rc.poststart and write here commands to add static route
- Make sure that /etc/persistent/rc.poststart are executable
- Check if your script work fine running the command line: ./etc/persistent/rc.poststart
note: the command now start with a "dot" = run the script!
- Run the command: cfgmtd -w -p /etc/ to make persistent
- Reboot and verify that all it's working...