diff --git a/core/base/libs/socrate/socrate/system.py b/core/base/libs/socrate/socrate/system.py index 23cfcdaa..c6cbd9cb 100644 --- a/core/base/libs/socrate/socrate/system.py +++ b/core/base/libs/socrate/socrate/system.py @@ -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() diff --git a/core/dovecot/start.py b/core/dovecot/start.py index 2c56a7b7..2a5de1ec 100755 --- a/core/dovecot/start.py +++ b/core/dovecot/start.py @@ -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") diff --git a/core/postfix/start.py b/core/postfix/start.py index 56adba4f..25787e8e 100755 --- a/core/postfix/start.py +++ b/core/postfix/start.py @@ -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)