What folder does sh files goes in?

Where should I put my .sh files so that they will not get deleted after an firmware upgrade. I put one and it got deleted after the firmware upgrade.

Add what you want preserved to /etc/sysupgrade.conf

You can confirm what will be saved using

sysupgrade -l

(Lower-case letter L)


I keep my scripts under /root/bin/ and preserve the /root/ with the above mentioned way.