How to (auto)start data polluter as a service?
First, I have installed Supervisor:
sudo apt-get install supervisor
Then I have edited config file:
sudo nano /etc/supervisor/conf.d/datapollution.conf
Application will be run as user matej, it will autostart at startup and will be restarted if dies:
[program:datapollution]
command = /usr/bin/python3 /home/matej/isp-data-pollution/isp_data_pollution.py -bw 1
user=matej
autostart=true
autorestart=true
Now I update Supervisor list:
sudo supervisorctl update
And check if data polluter is working:
sudo supervisorctl status
I get this:
datapollution STARTING
However, I should get RUNNING... I have Debian 9 system.
Or is there maybe some other, more elegant way to autorun it at startup?
If you want to run it in docker, I'm maintaining a containerized version here.
https://store.docker.com/community/images/pheonix991/isp-data-pollution
You can instead create a startup entry using Startup Applications if you are using Ubuntu.
Other distros should have an alternative application.
You can just put in python3 ~/isp-data-pollution/isp_data_pollution.py -bw 1 as command.