Supervisord- Execute a command before starting the application / program

Viewed 16249

Using supervisord, how do I execute a command before running the program?

For example in the code below, I want a file to be created before starting the program. In the code below I am using tail -f /dev/null to simulate the background process but this could be any running program like '/path/to/application'. I tried '&&' and this doesn't seem to work. The requirement is that the file has to be created first in order for the application to work.

[supervisord]
nodaemon=true
logfile=~/supervisord.log

[program:app]
command:touch ~a.c && tail -f /dev/null
2 Answers
Related