spectrum: Allow for overriding host and protocol

Environment variables in service drop-ins should be able to take effect
as easily as possible.
This commit is contained in:
Alex Palaistras 2021-10-26 14:17:03 +01:00
parent d83017d689
commit eb74a95840

View File

@ -9,9 +9,11 @@ NotifyAccess=all
SyslogIdentifier=%N SyslogIdentifier=%N
Restart=on-failure Restart=on-failure
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Environment=SPECTRUM_HOSTNAME=%p-%i SPECTRUM_PROTOCOL=prpl-%i
ExecStart=/bin/podman run --replace --name %p-%i --net internal --sdnotify=conmon \ ExecStart=/bin/podman run --replace --name %p-%i --net internal --sdnotify=conmon \
--env SPECTRUM_HOSTNAME=%p-%i --env SPECTRUM_PROTOCOL=prpl-%i \
--env-file %E/coreos-home-server/%p/%p.env \ --env-file %E/coreos-home-server/%p/%p.env \
--env SPECTRUM_HOSTNAME=${SPECTRUM_HOSTNAME} \
--env SPECTRUM_PROTOCOL=${SPECTRUM_PROTOCOL} \
--volume %p-%i:/var/lib/spectrum2:z \ --volume %p-%i:/var/lib/spectrum2:z \
localhost/%p:latest localhost/%p:latest
ExecStop=/bin/podman stop --ignore --time 10 %p-%i ExecStop=/bin/podman stop --ignore --time 10 %p-%i