From eb74a95840938d28fdb814cdac3642b496c38f88 Mon Sep 17 00:00:00 2001 From: Alex Palaistras Date: Tue, 26 Oct 2021 14:17:03 +0100 Subject: [PATCH] spectrum: Allow for overriding host and protocol Environment variables in service drop-ins should be able to take effect as easily as possible. --- config/service/spectrum/systemd/spectrum@.service | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/service/spectrum/systemd/spectrum@.service b/config/service/spectrum/systemd/spectrum@.service index a3572da..c32100d 100644 --- a/config/service/spectrum/systemd/spectrum@.service +++ b/config/service/spectrum/systemd/spectrum@.service @@ -9,9 +9,11 @@ NotifyAccess=all SyslogIdentifier=%N Restart=on-failure 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 \ - --env SPECTRUM_HOSTNAME=%p-%i --env SPECTRUM_PROTOCOL=prpl-%i \ --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 \ localhost/%p:latest ExecStop=/bin/podman stop --ignore --time 10 %p-%i