Falko Timme
2014-04-30 921fd61da3ceb2f88bff854d5c5cadfdb8e4130b
- 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 files modified
4 ■■■■ changed files
server/mods-available/web_module.inc.php 4 ●●●● patch | view | raw | blame | history
server/mods-available/web_module.inc.php
@@ -219,8 +219,8 @@
        }
        
        // 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;
    }