Unverified Commit 8a86d9d4 authored by Franz Pletz's avatar Franz Pletz Committed by GitHub
Browse files

Merge pull request #195190 from Ma27/coturn-replace-secret

nixos/coturn: refactor secret injection
parents 377db224 4fd75277
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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}
        '';