mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 13:40:45 +00:00
Alex Palaistras
b0a8100fbb
Compontents that intend to register against Prosody via unit files should be started completely before registration completes.
26 lines
1.0 KiB
Desktop File
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
|