Commit 921fd61d authored by Falko Timme's avatar Falko Timme

- simply call nginx -t instead of /usr/sbin/nginx -t; works if nginx is not...

- simply call nginx -t instead of /usr/sbin/nginx -t; works if nginx is not located in /usr/sbin, but elsewhere in the PATH.
parent ed7ede06
......@@ -219,8 +219,8 @@ class web_module {
}
// nginx: do a syntax check because on some distributions, the init script always returns 0 - even if the syntax is not ok (how stupid is that?)
if($web_config['server_type'] == 'nginx' && $retval['retval'] == 0 && is_executable('/usr/sbin/nginx')){
exec('/usr/sbin/nginx -t 2>&1', $retval['output'], $retval['retval']);
if($web_config['server_type'] == 'nginx' && $retval['retval'] == 0){
exec('nginx -t 2>&1', $retval['output'], $retval['retval']);
}
return $retval;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment