Skip to content

Instantly share code, notes, and snippets.

@danielrmeyer
Created June 27, 2016 17:03
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save danielrmeyer/068109840698c2ae944ee3219f57dfd9 to your computer and use it in GitHub Desktop.
Save danielrmeyer/068109840698c2ae944ee3219f57dfd9 to your computer and use it in GitHub Desktop.
supervisor config to keep a python script running in home directory.
[program:test]
command=/usr/bin/python /home/ubuntu/test.py
directory=/home/ubuntu
autostart=true
autorestart=true
startretries=3
stderr_logfile=/home/ubuntu/test.err.log
stdout_logfile=/home/ubuntu/test.out.log
user=ubuntu
@danielrmeyer
Copy link
Author

Drop this config in: /etc/supervisor/conf.d

@danielrmeyer
Copy link
Author

sudo service supervisor start
sudo supervisorctl start test
sudo supervisorct stop test

@guruvishnuvardan
Copy link

Hi,

Can you please help me resolve the following issue:

I have placed the config file @ /etc/supervisor/conf.d, Please find the file contents
[program:vel]
command=/usr/bin/python /home/user/Desktop/PitCrew/vel.py
directory=/home/user/Desktop
autostart=true
autorestart=true
startretries=3
stderr_logfile=/home/user/Desktop/vel.err.log
stdout_logfile=/home/user/Desktop/vel.out.log

But I get the following error, Please find the screen shot
supervise_1

Can you please let me know, whats the mistake

@danielrmeyer
Copy link
Author

Hey there, just saw your question. I am messing around with this now, I will let you know if I figure out what your issue is

@danielrmeyer
Copy link
Author

I think you are needing some extra sections

@CharlesLuttos
Copy link

@guruvishnuvardan try supervisord or supervisor instead of sudo service supervisor start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment