89a360a Remove PID file before starting nginx (#1268621)

Authored and Committed by jamielinux 8 years ago
    Remove PID file before starting nginx (#1268621)
    
    `nginx -t` creates the file /run/nginx.pid if it doesn't exist. `nginx -t` is
    executed by ExecStartPre (in nginx.service) and creates /run/nginx.pid with the
    correct SELinux context. However, when manually running `nginx -t` from the
    cmdline, the SELinux transition for systemd services doesn't occur and
    /run/nginx.pid is created with the wrong SELinux context. A workaround is to
    make sure that the PID file is removed before starting nginx.
    
        
file modified
+4 -0