mirror of
https://github.com/chatmail/relay.git
synced 2026-05-21 13:28:05 +00:00
docker: make healthcheck separate
This commit is contained in:
16
docker/healthcheck.sh
Normal file
16
docker/healthcheck.sh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# returns 0 when chatmail-init succeeded and all expected services are running.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
test -f /run/chatmail-init.done
|
||||||
|
|
||||||
|
# Core services
|
||||||
|
services="chatmail-metadata doveauth dovecot filtermail filtermail-incoming nginx postfix unbound"
|
||||||
|
|
||||||
|
# Optional services
|
||||||
|
for svc in iroh-relay turnserver; do
|
||||||
|
systemctl is-enabled "$svc" 2>/dev/null && services="$services $svc"
|
||||||
|
done
|
||||||
|
|
||||||
|
exec systemctl is-active $services
|
||||||
Reference in New Issue
Block a user