I have a python script that is located at
/etc/testscripts/WebServer. I call this usually from the command line by calling
sudo python3.6 /etc/testscripts/WebServer.
I have a bash script that looks as follows:
#!/bin/sh nohup python3.6 /etc/testscripts/WebServer
The name of this bash file is
How can I get this to execute on startup? The unit is running headless so no users are logging in. I did this before by adding
sudo python3.6 /etc/testscripts/WebServer to
/etc/rc.local but I want to run this via a bash script so that I can modify it later if needed by just changing the bash script rather than modifying rc.local.
I tried adding
sudo /etc/testscripts/startwebserver.sh & to rc.local and it didn't work.
Thanks in advance