mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 13:40:45 +00:00
prosody: Make component registration more robust
This commit is contained in:
parent
a5ce4675d5
commit
5131d1d93c
@ -75,6 +75,7 @@ modules_enabled = {
|
|||||||
"conversejs"; -- Web-based frontend for XMPP
|
"conversejs"; -- Web-based frontend for XMPP
|
||||||
"bookmarks"; -- Next-generation group-chat bookmarks
|
"bookmarks"; -- Next-generation group-chat bookmarks
|
||||||
"turn_external"; -- Connect to TURN/STUN server
|
"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
|
-- These modules are auto-loaded, but should you want
|
||||||
|
@ -12,13 +12,10 @@ Environment=COMPONENT_CONF=%E/coreos-home-server/prosody/service/component.cfg.l
|
|||||||
EnvironmentFile=-%E/coreos-home-server/%i/%i.env
|
EnvironmentFile=-%E/coreos-home-server/%i/%i.env
|
||||||
ExecStartPre=/bin/install --mode 0700 --directory /tmp/%N
|
ExecStartPre=/bin/install --mode 0700 --directory /tmp/%N
|
||||||
ExecStartPre=/bin/sh -c "envsubst < ${COMPONENT_CONF} > /tmp/%N/component.cfg.lua"
|
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
|
ExecStart=/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
|
ExecStartPost=/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"
|
|
||||||
ExecStartPost=/bin/rm -Rf /tmp/%N
|
ExecStartPost=/bin/rm -Rf /tmp/%N
|
||||||
ExecStop=/bin/podman exec prosody prosodyctl shell host deactivate "$PROSODY_COMPONENT_NAME"
|
ExecStop=/bin/podman exec --user=root prosody rm -f /etc/prosody/conf.d/10-%i.cfg.lua
|
||||||
ExecStopPost=/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
|
ExecStopPost=/bin/podman exec prosody prosodyctl shell config reload
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
Loading…
Reference in New Issue
Block a user