Package: nginx-common
Version: 1.6.2-5
Severity: normal

Hello.

When I run "/etc/init.d/nginx testconfig" and there is any problem, it returns
0 as exit code, and the message "[FAIL] Testing nginx configuration: failed!".
Same result when running "service nginx configtest".

In case of problems encountered, a non-zero return value is expected.

Steps to reproduce:
1. Break you Nginx configuration somehow (I put an extra "}" in the config).
2. Run "service nginx configtest".
3. Check exit value "echo $?", it's 0 instead of 1.

This functionality is very iseful when scripting Nginx controls, so it's
suitable to use constructions like this:
"/etc/init.d/nginx testconfig && /etc/init.d/nginx reload"

It worked as expected in Debian Wheezy and I first noticed this problem
in Debian Jessie.


-- System Information:
Debian Release: 8.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages nginx-common depends on:
ii  init-system-helpers  1.22
ii  lsb-base             4.1+Debian13+nmu1

nginx-common recommends no packages.

Versions of packages nginx-common suggests:
pn  fcgiwrap   <none>
pn  nginx-doc  <none>
pn  ssl-cert   <none>

-- Configuration Files:
/etc/nginx/sites-available/default [Errno 13] Permission denied: 
u'/etc/nginx/sites-available/default'

-- no debconf information

Reply via email to