diff --git a/core/postfix/start.py b/core/postfix/start.py index 509f961a..80c1c4bf 100755 --- a/core/postfix/start.py +++ b/core/postfix/start.py @@ -14,6 +14,8 @@ from socrate import system, conf log.basicConfig(stream=sys.stderr, level=os.environ.get("LOG_LEVEL", "WARNING")) +os.system("flock -n /queue/pid/master.pid rm /queue/pid/master.pid") + def start_podop(): os.setuid(getpwnam('postfix').pw_uid) os.makedirs('/dev/shm/postfix',mode=0o700, exist_ok=True) diff --git a/towncrier/newsfragments/1483.bugfix b/towncrier/newsfragments/1483.bugfix new file mode 100644 index 00000000..16e28f39 --- /dev/null +++ b/towncrier/newsfragments/1483.bugfix @@ -0,0 +1 @@ +Remove postfix's master.pid on startup if there is no other instance running