Add new service to existing supervisord process

Viewed 15665

Say I already have a supervisord process running on my machine. How can I add a new service/process for supervisord to monitor? For example, assume I have this simple .conf file:

run-suman-daemon.conf

[program:suman-daemon]
command=/Users/alexamil/WebstormProjects/suman/cli/suman-daemon.sh

I tried:

supervisord add run-suman-daemon.conf

but I get this error:

Error: positional arguments are not supported: ['add', 'sup.conf']
For help, use /usr/local/bin/supervisord -h

The supervisord daemon is running and I can connect to it with supervisorctl

3 Answers

You can use following commands for reading the new configuration and starting the new processes

supervisorctl reread
supervisorctl update

If you want to add a process dynamically, add this section to your supervisord.conf:

[include]
files = dir-with-your-conf-files/*.conf

All conf files placed in dir-with-your-conf-files will be loaded by the main config files. So you put, remove, change files in that dir (for example create symbolic links) and then run:

# reread configuration
supervisorctl reread
# start/stop new/old processes
supervisorctl update

I think you should call supervisorctl update first.

Related