2563: Close #1483: remove postfix's /queue/pid/master.pid r=mergify[bot] a=nextgens

## What type of PR?

bug-fix

## What does this PR do?

Remove postfix's /queue/pid/master.pid on startup if there is no other instance running.

### Related issue(s)
- closes #1483

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
This commit is contained in:
bors[bot]
2022-11-27 11:25:43 +00:00
committed by GitHub
2 changed files with 3 additions and 0 deletions

View File

@@ -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)

View File

@@ -0,0 +1 @@
Remove postfix's master.pid on startup if there is no other instance running