0
我试图自动部署一个web应用程序,更新应用程序需要关闭cron和nginx。如何用supervisord监控nginx和cron?
问题是,当我通过service nginx stop
和service cron stop
停止过程时,这些由supervisord重新启动。
supervisord没有init.d脚本,此外我不确定是否要使用supervisorctl来管理服务。
什么是正确的方法?
我试图自动部署一个web应用程序,更新应用程序需要关闭cron和nginx。如何用supervisord监控nginx和cron?
问题是,当我通过service nginx stop
和service cron stop
停止过程时,这些由supervisord重新启动。
supervisord没有init.d脚本,此外我不确定是否要使用supervisorctl来管理服务。
什么是正确的方法?
您需要为此使用supervisorctl
。但是,如果你在你的supervisorconfig配置supervisorctl
这只会工作
所以你需要使用
$ supervisorctl status
这会给你的服务的名称,然后你可以使用
$ supervisorctl stop nginx-program
$ supervisorctl stop cron-program
这就是你应该如何处理它
为什么这个标签[码头]?进程是否在Docker容器内运行?如果是这样,为什么不关闭容器? – jwodder