coreos-home-server/service/slidge/systemd/slidge@.service
Alex Palaistras b0a8100fbb Correct order for prosody-component-register
Compontents that intend to register against Prosody via unit files
should be started completely before registration completes.
2023-11-05 16:47:27 +00:00

26 lines
1.0 KiB
Desktop File

[Unit]
Description=Slidge Gateway for XMPP (%i)
Wants=container-build@%p.service container-volume@%p-%i.service prosody.service prosody-component-register@%p-%i.service
After=container-build@%p.service container-volume@%p-%i.service prosody.service
Before=prosody-component-register@%p-%i.service
PropagatesStopTo=prosody-component-register@%p-%i.service
[Service]
Type=notify
NotifyAccess=all
SyslogIdentifier=%N
Restart=on-failure
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=%E/coreos-home-server/prosody/prosody.env
ExecStart=/bin/podman run --replace --name %p-%i --net internal --sdnotify=conmon \
--entrypoint '["/venv/%i/bin/python", "-m", "slidge"]' \
--env-file %E/coreos-home-server/%p/%p.env \
--volume %p-%i:/var/lib/slidge:z \
localhost/%p:latest \
--jid=%i.${PROSODY_HOST}
ExecStop=/bin/podman stop --ignore --time 10 %p-%i
ExecStopPost=/bin/podman rm --ignore --force %p-%i
[Install]
WantedBy=multi-user.target