Skip to content

Commit 921fd61

Browse files
committed
- simply call nginx -t instead of /usr/sbin/nginx -t; works if nginx is not located in /usr/sbin, but elsewhere in the PATH.
1 parent ed7ede0 commit 921fd61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/mods-available/web_module.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ function restartHttpd($action = 'restart') {
219219
}
220220

221221
// 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?)
222-
if($web_config['server_type'] == 'nginx' && $retval['retval'] == 0 && is_executable('/usr/sbin/nginx')){
223-
exec('/usr/sbin/nginx -t 2>&1', $retval['output'], $retval['retval']);
222+
if($web_config['server_type'] == 'nginx' && $retval['retval'] == 0){
223+
exec('nginx -t 2>&1', $retval['output'], $retval['retval']);
224224
}
225225
return $retval;
226226
}

0 commit comments

Comments
 (0)