Make sure stale pid files are dealt with, fix #341

This commit is contained in:
kaiyou
2017-12-03 11:28:26 +01:00
parent 743eb81908
commit 4761646616
2 changed files with 5 additions and 1 deletions

View File

@@ -3,6 +3,9 @@
import os
import subprocess
# Check if a stale pid file exists
if os.path.exists("/var/log/nginx.pid"):
os.remove("/var/log/nginx.pid")
# Actual startup script
if not os.path.exists("/certs/dhparam.pem") and os.environ["TLS_FLAVOR"] != "notls":