matrix-synapse: Only run StartPre script when data folder doesn't exist (#17216)
This commit is contained in:
parent
c31cbe8f9c
commit
b65e9d87e2
@ -338,6 +338,7 @@
|
||||
robberer = "Longrin Wischnewski <robberer@freakmail.de>";
|
||||
robbinch = "Robbin C. <robbinch33@gmail.com>";
|
||||
robgssp = "Rob Glossop <robgssp@gmail.com>";
|
||||
roblabla = "Robin Lambertz <robinlambertz+dev@gmail.com>";
|
||||
roconnor = "Russell O'Connor <roconnor@theorem.ca>";
|
||||
romildo = "José Romildo Malaquias <malaquias@gmail.com>";
|
||||
rszibele = "Richard Szibele <richard_szibele@hotmail.com>";
|
||||
|
@ -522,10 +522,12 @@ in {
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
preStart = ''
|
||||
mkdir -p /var/lib/matrix-synapse
|
||||
chmod 700 /var/lib/matrix-synapse
|
||||
chown -R matrix-synapse:matrix-synapse /var/lib/matrix-synapse
|
||||
${cfg.package}/bin/homeserver --config-path ${configFile} --keys-directory /var/lib/matrix-synapse/ --generate-keys
|
||||
if ! test -e /var/lib/matrix-synapse; then
|
||||
mkdir -p /var/lib/matrix-synapse
|
||||
chmod 700 /var/lib/matrix-synapse
|
||||
chown -R matrix-synapse:matrix-synapse /var/lib/matrix-synapse
|
||||
${cfg.package}/bin/homeserver --config-path ${configFile} --keys-directory /var/lib/matrix-synapse/ --generate-keys
|
||||
fi
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
|
@ -41,6 +41,6 @@ buildPythonApplication rec {
|
||||
homepage = https://matrix.org;
|
||||
description = "Matrix reference homeserver";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.ralith ];
|
||||
maintainers = [ maintainers.ralith maintainers.roblabla ];
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user