[program: ] ( is name of program) command=/bin/ //Execute command process_name=%(program_name)s //if your numprocs is more than 1 it should be %(program_name)s_%(process_num)02d numprocs=1//Number of your concurrent process Perfect for gearman directory=/tmp //cd this directory before running priority=999//priority or program maximum is 999 autostart=true autorestart=true startretries=3//number of retrying times if process is die stopwaitsecs=10//waiting xx second before before stop user=chrism //exec by user should be “root” //Log control stdout_logfile=/a/path stdout_logfile_maxbytes=1MB
sudo vi /etc/rc.d/init.d/supervisord #!/bin/sh # # /etc/rc.d/init.d/supervisord # # Supervisor is a client/server system that # allows its users to monitor and control a # number of processes on UNIX-like operating # systems. # # chkconfig: - 64 36 # description: Supervisor Server # processname: supervisord