I want to put myScript.sh
on autostart.
I have set the configuration.
chmod +x /etc/init.d/myScript.sh
And enable it
sudo update-rc.d /etc/init.d/myScript.sh defaults
But when I run the myScript.sh
I get an error because of the flag -bootRun
. myScript.sh
looks like this:
sudo /home/pi/path/to/my/program/gradlew -bootRun
How can I run this script instead?
Edit:
I listen to that guy below. I place my code at the rc.local
at /etc
in Raspberry.
But when I run I ge this error. Why?