renge/coturn: Fix ACME copying

Sandboxing requires + instead of ! for elevating permissions of
pre-start script.
This commit is contained in:
Simon Bruder 2024-12-15 17:03:39 +01:00
parent 90d3720a75
commit d23c15da90
Signed by: simon
GPG key ID: 347FF8699CDA0776

View file

@ -72,7 +72,8 @@ in
systemd.services.coturn = {
after = [ "acme-finished-${fqdn}.target" ];
serviceConfig = {
ExecStartPre = lib.singleton "!${pkgs.writeShellScript "coturn-setup-tls" ''
RuntimeDirectory = "turnserver";
ExecStartPre = lib.singleton "+${pkgs.writeShellScript "coturn-setup-tls" ''
cp ${config.security.acme.certs."${fqdn}".directory}/{fullchain,key}.pem /run/turnserver/
chgrp turnserver /run/turnserver/{fullchain,key}.pem
''}";