【问题标题】:Is it possible to change a PID in Supervisord是否可以在 Supervisord 中更改 PID
【发布时间】:2022-08-13 23:39:04
【问题描述】:

我有一个运行 NGINX 的 /bin/NginxWrapper 脚本:

#!/bin/env sh

export LD_LIBRARY_PATH=$ENVIRONMENT_ROOT/lib/:$LD_LIBRARY_PATH
/bin/nginx

supervisord config 命令指向上面的脚本,这样当我们启动 Nginx 时,supervisor 会首先调用这个脚本

[program:nginx]
command=/bin/NginxWrapper -c /nginx/nginx.conf -g \"daemon off;\"

问题是,Superisord 现在存储的是这个脚本的 PID,而不是 Nginx 的 PID。如果我尝试将 HUP 发送到 Nginx,它就无法发送。

是否可以将supervisord中的PID更改为Nginx的PID? 或者 有没有办法链接 Supersivord 命令,这样我就不需要包装器,并且可以链接类似的东西

[program:nginx]
    command= export LD_LIBRARY_PATH=$ENVIRONMENT_ROOT/lib/:$LD_LIBRARY_PATH && /bin/NginxWrapper -c /nginx/nginx.conf -g \"daemon off;\"

非常感谢...

    标签: nginx supervisord


    【解决方案1】:

    改变

    /bin/nginx
    

    至

    exec /bin/nginx
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-29
      • 1970-01-01
      • 2016-09-22
      • 1970-01-01
      • 2017-01-22
      • 1970-01-01
      相关资源
      最近更新 更多