nixos/xrdp: use --replace-fail with substituteInPlace, try #2 (#392512)

authored by Sandro and committed by GitHub ace047b8 78caed26

+11 -11
+11 -11
nixos/modules/services/networking/xrdp.nix
··· 25 25 chmod +x $out/startwm.sh 26 26 27 27 substituteInPlace $out/xrdp.ini \ 28 - --replace "#rsakeys_ini=" "rsakeys_ini=/run/xrdp/rsakeys.ini" \ 29 - --replace "certificate=" "certificate=${cfg.sslCert}" \ 30 - --replace "key_file=" "key_file=${cfg.sslKey}" \ 31 - --replace LogFile=xrdp.log LogFile=/dev/null \ 32 - --replace EnableSyslog=true EnableSyslog=false 28 + --replace-fail "#rsakeys_ini=" "rsakeys_ini=/run/xrdp/rsakeys.ini" \ 29 + --replace-fail "certificate=" "certificate=${cfg.sslCert}" \ 30 + --replace-fail "key_file=" "key_file=${cfg.sslKey}" \ 31 + --replace-fail LogFile=xrdp.log LogFile=/dev/null \ 32 + --replace-fail EnableSyslog=true EnableSyslog=false 33 33 34 34 substituteInPlace $out/sesman.ini \ 35 - --replace LogFile=xrdp-sesman.log LogFile=/dev/null \ 36 - --replace EnableSyslog=1 EnableSyslog=0 \ 37 - --replace startwm.sh $out/startwm.sh \ 38 - --replace reconnectwm.sh $out/reconnectwm.sh \ 35 + --replace-fail LogFile=xrdp-sesman.log LogFile=/dev/null \ 36 + --replace-fail EnableSyslog=true EnableSyslog=false \ 37 + --replace-fail startwm.sh $out/startwm.sh \ 38 + --replace-fail reconnectwm.sh $out/reconnectwm.sh \ 39 39 40 40 # Ensure that clipboard works for non-ASCII characters 41 41 sed -i -e '/.*SessionVariables.*/ a\ ··· 127 127 ''; 128 128 example = '' 129 129 substituteInPlace $out/sesman.ini \ 130 - --replace LogLevel=INFO LogLevel=DEBUG \ 131 - --replace LogFile=/dev/null LogFile=/var/log/xrdp.log 130 + --replace-fail LogLevel=INFO LogLevel=DEBUG \ 131 + --replace-fail LogFile=/dev/null LogFile=/var/log/xrdp.log 132 132 ''; 133 133 }; 134 134 };