Run script on boot

hi guys I would like to start a script on boot
sh /root/
on openwrt 19.07.

this script has no end, it reads a file every 2 seconds.
i tried with
#! / bin / sh /etc/rc.common
but it crashes the whole system ..
how can I do ..?

You can start the script in a detached shell:

e.g. add this to /etc/rc.local:

( /root/ )&

Ps. make sure to specify the correct directory or place the script on a directory that is in path.

Earlier discussion:


thanks a lot of advice
the same script launched by shell works fine,
but not since boot in
here is a screeshot of the top command that sees and sees the command but does not go ..
maybe there are problems with sshpass