prosody: Make component registration more flexible
This commit is contained in:
parent
cb4b61321e
commit
6f8b8763c6
|
@ -68,7 +68,7 @@ HUGO_DEPLOY_SECRET=password
|
|||
# Configuration for GoToSocial.
|
||||
GOTOSOCIAL_HOST=social.localhost
|
||||
GOTOSOCIAL_ACCOUNT_DOMAIN=localhost
|
||||
GOTOSOCIAL_DEFAULT_USERNAME=default
|
||||
GOTOSOCIAL_DEFAULT_USERNAME=admin
|
||||
GOTOSOCIAL_SMTP_FROM=noreply@social.localhost
|
||||
|
||||
# Configuration for Slidge.
|
||||
|
|
|
@ -8,16 +8,17 @@ Type=oneshot
|
|||
RemainAfterExit=true
|
||||
SyslogIdentifier=%N
|
||||
Environment=PROSODY_COMPONENT_NAME=%i
|
||||
Environment=COMPONENT_CONF=%E/coreos-home-server/prosody/service/component.cfg.lua.template
|
||||
EnvironmentFile=-%E/coreos-home-server/%i/%i.env
|
||||
ExecStartPre=/bin/install --mode 0700 --directory /tmp/%N
|
||||
ExecStartPre=/bin/sh -c "envsubst < %E/coreos-home-server/prosody/service/component.cfg.lua.template > /tmp/%N/component.cfg.lua"
|
||||
ExecStartPre=/bin/podman cp --archive=false /tmp/%N/component.cfg.lua prosody:/etc/prosody/conf.d/%i.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
|
||||
ExecStartPre=/bin/sh -c 'podman exec prosody prosodyctl shell host deactivate "$PROSODY_COMPONENT_NAME" || true'
|
||||
ExecStartPre=/bin/podman exec prosody prosodyctl shell config reload
|
||||
ExecStart=/bin/podman exec prosody prosodyctl shell host activate "$PROSODY_COMPONENT_NAME"
|
||||
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/%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
|
||||
|
||||
[Install]
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
[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
|
||||
After=container-build@%p.service container-volume@%p-%i.service prosody.service prosody-component-register@%p-%i.service
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
|
|
Loading…
Reference in New Issue