Hello,
First of all, check if your created script file has set execution permission. To do that, navigate via ssh to the folder where your script is and execute command:
ls -l
Your output should look something like that:
- r - refers to read permission.
- w - refers to write permission.
- x - refers to execute permission.
If there are none execute permission set, please use this command:
chmod +x test.sh
Secondly, edit /etc/sysupgrade.conf file to preserve your script after upgrades. For example my script is in root folder:
Do not forget to save changes!
And lastly, check if you have specified correct script file path in /etc/rc.local file. My file is in root folder so it looks like this:
Regards.