1 安装Supervisor 参见https://hacpai.com/article/1497093478747,也有其他的安装方式,请自行百度
Supervisor详解:http://blog.51cto.com/lixcto/1539136
2 启动Supervisor,启动命令1 :brew services start supervisor 启动命令2:supervisord -c supervisord.ini
这两种方式启动的效果是不一样的,具体原因没找到,下面这段配置,用启动命令1 :brew services start supervisor,这种方式启动,一直报错运行不起来。
用启动命令2:supervisord -c supervisord.ini这种方式启动,却可以正常运行。好像这两种启动方式的运行环境不一样导致的,具体的原因没有深究,如果你知道可以告诉我,谢谢!
刚开始我是按照第一种方式启动的,一直报错,花了两天时间也没找到原因。最后用了命令二却好了。
[program:frontail] directory = /usr/local/bin/ command=/bin/bash -c 'source "$0" && exec "$@"' /Users/ddios/.bash_profile frontail /tmp/build.log stdout_logfile=/Users/ddios/frontail_stdout.log stdout_logfile_maxbytes=10MB stderr_logfile=/Users/ddios/frontail_stderr.log user = ddios stderr_logfile_maxbytes=10MB autostart=true autorestart=true