Restart nginx by executing/usr/bin/nginxdrestart. the script content is as follows :#! /Usr/local/php/bin/php & lt ;? If ($ argv [1] & quot; start & quot;) {echosystem (& quot; ulimit-SHn51200 & quot;); echosystem (& quot;/u
Restart nginx by executing/usr/bin/nginxd restart.
The script content is as follows:
#! /Usr/local/php/bin/php
If ($ argv [1] = "start ")
{
Echo system ("ulimit-shn51200 ");
Echo system ("/usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx. conf ");
}
Elseif ($ argv [1] = "stop ")
{
Echo system ("killall-9 nginx ");
}
Elseif ($ argv [1] = "test ")
{
Echo system ("/usr/local/nginx/sbin/nginx-t ");
}
Elseif ($ argv [1] = "restart ")
{
Echo system ("killall-9 nginx ");
Sleep (1 );
Echo system ("ulimit-shn51200 ");
Echo system ("/usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx. conf ");
}
Else
Echo "Usage: nginx {start | stop | restart | test |} \ r \ n ";
?>
Author: "porridge is not hungry"