Merge pull request #204560 from jcumming/resilio_config_passthru
passthrough config if there are no secrets defined (address #204559)
This commit is contained in:
commit
a95574fd2e
@ -52,7 +52,8 @@ let
|
|||||||
|
|
||||||
runConfigPath = "/run/rslsync/config.json";
|
runConfigPath = "/run/rslsync/config.json";
|
||||||
|
|
||||||
createConfig = pkgs.writeShellScriptBin "create-resilio-config" ''
|
createConfig = pkgs.writeShellScriptBin "create-resilio-config" (
|
||||||
|
if cfg.sharedFolders != [ ] then ''
|
||||||
${pkgs.jq}/bin/jq \
|
${pkgs.jq}/bin/jq \
|
||||||
'.shared_folders |= map(.secret = $ARGS.named[.dir])' \
|
'.shared_folders |= map(.secret = $ARGS.named[.dir])' \
|
||||||
${
|
${
|
||||||
@ -62,7 +63,11 @@ let
|
|||||||
} \
|
} \
|
||||||
<${configFile} \
|
<${configFile} \
|
||||||
>${runConfigPath}
|
>${runConfigPath}
|
||||||
'';
|
'' else ''
|
||||||
|
# no secrets, passing through config
|
||||||
|
cp ${configFile} ${runConfigPath};
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user