The miniconda path in your script makes me think you’re running on an embedded Linux system such as a rpi.
I have had success running in a similar setup using systemd. It should work on any Linux distribution that supports systemd.
It is fairly straightforward to set up on a Linux-based device that supports systemd.
- Create a file that defines the service and copy that file to /lib/systemd/system
sudo cp my-app.service /lib/systemd/system/.
- Start the service
sudo systemctl start my-app
- Enable the service to run at boot
sudo systemctl enable my-app
The status of the service can be viewed with the following
service my-app status
Here’s an example of a service; the shell script referenced therein is a script that should execute that defines the functionality of the service. This should point to the bash script you’ve pasted into the topic; make sure that it has its execute attributes set, I believe.
Description=Bokeh web server service