一、安装supervisor
yum install -y epel-release yum install -y supervisor systemctl start supervisord systemctl enable supervisord
二、使用supervisor管理进程
cat >/etc/supervisord.d/freeswitch.ini <<EOF [program:freeswitch] command=/usr/local/freeswitch/bin/freeswitch -nonat -nosql directory=/usr/local/freeswitch/bin/ user=root autorestart=true redirect_stderr=true stdout_logfile=/usr/local/freeswitch/logs/supervisor.log loglevel=info
注意:supervisor要求程序不能以后台启动,所以 -nc
要删除。