1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2026-01-02 11:39:23 +00:00

[Clamd] use python bootstrapper to start CLAMD container

This commit is contained in:
FreddleSpl0it
2025-05-21 14:02:49 +02:00
parent 5a39ae45cb
commit 669f75182d
9 changed files with 122 additions and 60 deletions

View File

@@ -0,0 +1,20 @@
#!/bin/bash
# Run hooks
for file in /hooks/*; do
if [ -x "${file}" ]; then
echo "Running hook ${file}"
"${file}"
fi
done
python3 -u /bootstrap/main.py
BOOTSTRAP_EXIT_CODE=$?
if [ $BOOTSTRAP_EXIT_CODE -ne 0 ]; then
echo "Bootstrap failed with exit code $BOOTSTRAP_EXIT_CODE. Not starting Clamd."
exit $BOOTSTRAP_EXIT_CODE
fi
echo "Bootstrap succeeded. Starting Clamd..."
exec "$@"