Run script on boot

hi guys I would like to start a script on boot
sh /root/sms.sh
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/sms.sh )&

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

Earlier discussion:

2 Likes

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