matrix-ctl: restart the homeserver when it loaded another registration, not when the file is newer, and never while it starts
This commit is contained in:
parent
72b05d269c
commit
e77758d0d0
1 changed files with 210 additions and 46 deletions
|
|
@ -1156,9 +1156,10 @@ in
|
|||
# Keeps the rendered registration in step with the store, and
|
||||
# publishes the `as_token` to the path `swarm-controller` reads,
|
||||
# under matrix-ctl's identity (the grants are in ./swarm-bao.nix).
|
||||
# When the registration is newer than tuwunel's last start, this
|
||||
# restarts tuwunel onto it; a tuwunel that failed because the render
|
||||
# did is started the same way.
|
||||
# When tuwunel is not running on the registration on disk (the text
|
||||
# it loaded differs), this restarts it onto it, and never while it is
|
||||
# still starting; a tuwunel that failed because the render did is
|
||||
# started the same way.
|
||||
#
|
||||
# `wants`, not `requires`, the render: this unit must still run when
|
||||
# the render has failed, since it is what brings the homeserver up
|
||||
|
|
@ -1186,6 +1187,9 @@ in
|
|||
};
|
||||
environment = appserviceEnv // {
|
||||
MATRIX_APPSERVICE_RESTART_UNIT = "tuwunel.service";
|
||||
# systemd's copy of the registration, made when tuwunel starts: what
|
||||
# it loaded, which the sync compares with the file instead of times.
|
||||
MATRIX_APPSERVICE_LOADED_REGISTRATION = "/run/credentials/tuwunel.service/${swarmAppserviceCredentialId}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue