I have a /bin/NginxWrapper script that runs NGINX:
#!/bin/env sh
export LD_LIBRARY_PATH=$ENVIRONMENT_ROOT/lib/:$LD_LIBRARY_PATH
/bin/nginx
Supervisord config command points the above script, so that when we kick off Nginx, supervisor will first call this script
[program:nginx]
command=/bin/NginxWrapper -c /nginx/nginx.conf -g "daemon off;"
The problem is, Superisord is now storing the PID of this script, instead of the PID of Nginx. And if i try to send HUP to Nginx, its unable to.
Is it possible to change the PID in supervisord so that it's Nginx's PID? OR Is there a way to chain Supersivord command so that i dont need the wrapper, and can just chain something like
[program:nginx]
command= export LD_LIBRARY_PATH=$ENVIRONMENT_ROOT/lib/:$LD_LIBRARY_PATH && /bin/NginxWrapper -c /nginx/nginx.conf -g "daemon off;"
Many thanks...
CodePudding user response:
Change
/bin/nginx
to
exec /bin/nginx