syncthing: run preStart as root on 19.09

This commit is contained in:
lassulus 2019-07-15 18:26:30 +02:00
parent 035cf33ab9
commit 9bc7f594f5

View File

@ -176,6 +176,7 @@ in
config = mkIf kcfg.enable { config = mkIf kcfg.enable {
systemd.services.syncthing = mkIf (kcfg.cert != null || kcfg.key != null) { systemd.services.syncthing = mkIf (kcfg.cert != null || kcfg.key != null) {
serviceConfig.PermissionsStartOnly = mkDefault true;
preStart = '' preStart = ''
${optionalString (kcfg.cert != null) '' ${optionalString (kcfg.cert != null) ''
cp ${toString kcfg.cert} ${scfg.configDir}/cert.pem cp ${toString kcfg.cert} ${scfg.configDir}/cert.pem