1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-12-19 21:01:31 +00:00

[Rspamd] use python bootstrapper to start RSPAMD container

This commit is contained in:
FreddleSpl0it
2025-05-21 09:40:38 +02:00
parent 2efea9c832
commit b8888521f1
16 changed files with 416 additions and 333 deletions

View File

@@ -1,7 +1,14 @@
import os
import sys
import signal
def handle_sigterm(signum, frame):
print("Received SIGTERM, exiting gracefully...")
sys.exit(0)
def main():
signal.signal(signal.SIGTERM, handle_sigterm)
container_name = os.getenv("CONTAINER_NAME")
if container_name == "sogo-mailcow":
@@ -12,6 +19,8 @@ def main():
from modules.BootstrapPostfix import Bootstrap
elif container_name == "dovecot-mailcow":
from modules.BootstrapDovecot import Bootstrap
elif container_name == "rspamd-mailcow":
from modules.BootstrapRspamd import Bootstrap
else:
print(f"No bootstrap handler for container: {container_name}", file=sys.stderr)
sys.exit(1)