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 = ''
|
preStart = ''
|
||||||
cat ${configFile} > ${runConfig}
|
cat ${configFile} > ${runConfig}
|
||||||
${optionalString (cfg.static-auth-secret-file != null) ''
|
${optionalString (cfg.static-auth-secret-file != null) ''
|
||||||
STATIC_AUTH_SECRET="$(head -n1 ${cfg.static-auth-secret-file} || :)"
|
${pkgs.replace-secret}/bin/replace-secret \
|
||||||
sed -e "s,#static-auth-secret#,$STATIC_AUTH_SECRET,g" \
|
"#static-auth-secret#" \
|
||||||
-i ${runConfig}
|
${cfg.static-auth-secret-file} \
|
||||||
|
${runConfig}
|
||||||
'' }
|
'' }
|
||||||
chmod 640 ${runConfig}
|
chmod 640 ${runConfig}
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user