wait for dovecot
This commit is contained in:
@@ -108,7 +108,23 @@ def sync():
|
||||
|
||||
print(f'✓ {email}')
|
||||
|
||||
def wait_for_dovecot():
|
||||
"""Wartet, bis der Dovecot Auth Socket verfügbar ist."""
|
||||
# Der Pfad zum Socket, über den doveadm kommuniziert
|
||||
socket_path = '/var/run/dovecot/auth-userdb'
|
||||
|
||||
print("⏳ Warte auf Dovecot Start...")
|
||||
while not os.path.exists(socket_path):
|
||||
print(f" ... Socket {socket_path} noch nicht da. Schlafe 5s.")
|
||||
time.sleep(5)
|
||||
|
||||
print("✅ Dovecot ist bereit!")
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
# 1. Erst warten, bis Dovecot da ist, sonst hagelt es Fehler beim Start
|
||||
wait_for_dovecot()
|
||||
|
||||
# Pfad zur Cron-Definition (nur der String, z.B. "*/5 * * * *")
|
||||
CRON_FILE = '/etc/sieve-schedule'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user