I know it is an old post but if it can help some users :
If you wanna make a script that works regardless the routerboard model and is stored even after reboot (which allows you to .. run it after a reset), simply always store them in a folder called "flash" :-]