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