diff --git a/service/prosody/container/config/prosody.cfg.lua b/service/prosody/container/config/prosody.cfg.lua index af698d6..2ba26e7 100644 --- a/service/prosody/container/config/prosody.cfg.lua +++ b/service/prosody/container/config/prosody.cfg.lua @@ -75,6 +75,7 @@ modules_enabled = { "conversejs"; -- Web-based frontend for XMPP "bookmarks"; -- Next-generation group-chat bookmarks "turn_external"; -- Connect to TURN/STUN server + "reload_components"; -- Automatically reload components when they are added and removed. } -- These modules are auto-loaded, but should you want diff --git a/service/prosody/systemd/prosody-component-register@.service b/service/prosody/systemd/prosody-component-register@.service index 06a43f3..3f77487 100644 --- a/service/prosody/systemd/prosody-component-register@.service +++ b/service/prosody/systemd/prosody-component-register@.service @@ -12,13 +12,10 @@ Environment=COMPONENT_CONF=%E/coreos-home-server/prosody/service/component.cfg.l EnvironmentFile=-%E/coreos-home-server/%i/%i.env ExecStartPre=/bin/install --mode 0700 --directory /tmp/%N ExecStartPre=/bin/sh -c "envsubst < ${COMPONENT_CONF} > /tmp/%N/component.cfg.lua" -ExecStartPre=/bin/podman cp --archive=false /tmp/%N/component.cfg.lua prosody:/etc/prosody/conf.d/10-%i.cfg.lua -ExecStartPre=/bin/podman exec prosody prosodyctl shell config reload -ExecStartPre=/bin/sh -c 'podman exec prosody prosodyctl shell host deactivate "$PROSODY_COMPONENT_NAME" || true' -ExecStart=/bin/podman exec prosody prosodyctl shell host activate "$PROSODY_COMPONENT_NAME" +ExecStart=/bin/podman cp --archive=false /tmp/%N/component.cfg.lua prosody:/etc/prosody/conf.d/10-%i.cfg.lua +ExecStartPost=/bin/podman exec prosody prosodyctl shell config reload ExecStartPost=/bin/rm -Rf /tmp/%N -ExecStop=/bin/podman exec prosody prosodyctl shell host deactivate "$PROSODY_COMPONENT_NAME" -ExecStopPost=/bin/podman exec --user=root prosody rm -f /etc/prosody/conf.d/10-%i.cfg.lua +ExecStop=/bin/podman exec --user=root prosody rm -f /etc/prosody/conf.d/10-%i.cfg.lua ExecStopPost=/bin/podman exec prosody prosodyctl shell config reload [Install]