2017-09-01 110 views
0

我试图自动部署一个web应用程序,更新应用程序需要关闭cron和nginx。如何用supervisord监控nginx和cron?

问题是,当我通过service nginx stopservice cron stop停止过程时,这些由supervisord重新启动。

supervisord没有init.d脚本,此外我不确定是否要使用supervisorctl来管理服务。

什么是正确的方法?

+0

为什么这个标签[码头]?进程是否在Docker容器内运行?如果是这样,为什么不关闭容器? – jwodder

回答

1

您需要为此使用supervisorctl。但是,如果你在你的supervisorconfig配置supervisorctl这只会工作

所以你需要使用

$ supervisorctl status 

这会给你的服务的名称,然后你可以使用

$ supervisorctl stop nginx-program 
$ supervisorctl stop cron-program 

这就是你应该如何处理它