1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-03-03 14:52:36 +02:00

Delete the PID file to avoid race conditions

Apparently sometimes the podop subprocess can be re-assigned the same
PID when the container is restarted, causing havok.
This commit is contained in:
Florent Daigniere 2023-08-25 13:40:22 +02:00
parent fb97cec238
commit 1731f45d83
2 changed files with 2 additions and 0 deletions

View File

@ -33,6 +33,7 @@ for script_file in glob.glob("/conf/*.script"):
# Run Podop, then postfix
os.system("chown mail:mail /mail")
os.system("chown -R mail:mail /var/lib/dovecot /conf")
os.system("rm -rf /run/dovecot/master.pid")
multiprocessing.Process(target=start_podop).start()
os.system("dovecot -c /etc/dovecot/dovecot.conf -F")

View File

@ -0,0 +1 @@
Ensure that we delete any pre-exising PID file before starting dovecot