mirror of
https://github.com/Mailu/Mailu.git
synced 2024-12-12 10:45:38 +02:00
Move the cleanup to socrate
This commit is contained in:
parent
1731f45d83
commit
367fd247cb
@ -97,6 +97,8 @@ def set_env(required_secrets=[], log_filters=[], log_file=None):
|
||||
for secret in required_secrets:
|
||||
os.environ[f'{secret}_KEY'] = hmac.new(bytearray(secret_key, 'utf-8'), bytearray(secret, 'utf-8'), 'sha256').hexdigest()
|
||||
|
||||
os.system('find / -xdev -type f -name \*.pid -print -delete')
|
||||
|
||||
return {
|
||||
key: _coerce_value(os.environ.get(key, value))
|
||||
for key, value in os.environ.items()
|
||||
|
@ -33,7 +33,6 @@ 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")
|
||||
|
@ -16,8 +16,6 @@ system.set_env(log_filters=[
|
||||
r'discarding EHLO keywords\: PIPELINING$',
|
||||
], log_file=os.environ.get('POSTFIX_LOG_FILE'))
|
||||
|
||||
os.system("flock -n /queue/pid/master.pid rm /queue/pid/master.pid")
|
||||
|
||||
def start_podop():
|
||||
system.drop_privs_to('postfix')
|
||||
os.makedirs('/dev/shm/postfix',mode=0o700, exist_ok=True)
|
||||
|
Loading…
Reference in New Issue
Block a user