# container-koopa-nym.service
# Install on koopa as hernani:
#   mkdir -p ~/.config/systemd/user
#   cp configs/nym/container-koopa-nym.service ~/.config/systemd/user/
#   systemctl --user daemon-reload
#   systemctl --user enable --now container-koopa-nym.service
# Requires: loginctl enable-linger hernani (root, once)
#
# Container must already exist (podman compose up -d once).

[Unit]
Description=Podman container-koopa-nym.service (nym.com nym-node)
Documentation=https://nym.com/docs/operators/nodes/nym-node
Wants=network-online.target
After=network-online.target
RequiresMountsFor=/run/user/1000/containers

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=always
TimeoutStopSec=90
ExecStart=/usr/bin/podman start koopa-nym
ExecStop=/usr/bin/podman stop -t 20 koopa-nym
ExecStopPost=/usr/bin/podman stop -t 20 koopa-nym
Type=forking

[Install]
WantedBy=default.target
