[Unit]
Description=Metin DB readiness gate
After=metin-db.service
Wants=metin-db.service
Requires=metin-db.service
PartOf=metin-server.service
Before=metin-auth.service metin-game@.service metin-server.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/libexec/metin-wait-port {{WAIT_HOST}} {{WAIT_PORT}} {{WAIT_TIMEOUT}}
TimeoutStartSec={{WAIT_TIMEOUT_SYSTEMD}}

[Install]
RequiredBy=metin-server.service
