[Unit]
Description=Metin database runtime
After=network-online.target mariadb.service
Wants=network-online.target
Requires=mariadb.service
PartOf=metin-server.service
Before=metin-server.service

[Service]
Type=simple
User={{USER_NAME}}
Group={{GROUP_NAME}}
EnvironmentFile=-{{ENV_FILE}}
WorkingDirectory={{RUNTIME_ROOT}}/channels/db
ExecStart={{RUNTIME_ROOT}}/channels/db/db
Restart=on-failure
RestartSec=5
KillSignal=SIGTERM
TimeoutStopSec=60
LimitNOFILE=65535

[Install]
RequiredBy=metin-server.service
