Merge pull request #195190 from Ma27/coturn-replace-secret
nixos/coturn: refactor secret injection
This commit is contained in:
commit
8a86d9d4aa
@ -335,9 +335,10 @@ in {
|
||||
preStart = ''
|
||||
cat ${configFile} > ${runConfig}
|
||||
${optionalString (cfg.static-auth-secret-file != null) ''
|
||||
STATIC_AUTH_SECRET="$(head -n1 ${cfg.static-auth-secret-file} || :)"
|
||||
sed -e "s,#static-auth-secret#,$STATIC_AUTH_SECRET,g" \
|
||||
-i ${runConfig}
|
||||
${pkgs.replace-secret}/bin/replace-secret \
|
||||
"#static-auth-secret#" \
|
||||
${cfg.static-auth-secret-file} \
|
||||
${runConfig}
|
||||
'' }
|
||||
chmod 640 ${runConfig}
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user