kdc: Improve handling of stopping service

This commit is contained in:
Timo Makinen 2023-01-25 05:58:57 +00:00
parent 983fefe383
commit 160073262d

View file

@ -1,13 +1,20 @@
[Unit]
Description=Kerberos KDC Container
Wants=network-online.target
After=network-online.target
[Service]
User=kdc
EnvironmentFile=/etc/sysconfig/kdc-container
ExecStart=/usr/bin/podman run --rm -p 127.0.0.1:8001:8000 --name kdc \
-e LDAP_BASEDN -e LDAP_BIND_PW -e KRB5_REALM -e KRB5_STASH_PW kdc
ExecStop=/usr/bin/podman stop kdc
KillMode=none
ExecStart=/usr/bin/podman run \
--rm -p 127.0.0.1:8001:8000 \
--name kdc \
-e LDAP_BASEDN \
-e LDAP_BIND_PW \
-e KRB5_REALM \
-e KRB5_STASH_PW kdc
ExecStop=/usr/bin/podman stop --ignore kdc
ExecStopPost=/usr/bin/podman rm -f --ignore kdc
[Install]
WantedBy=multi-user.target