Linux - Multiple shared Folders in config file


Recommended Posts

Hello Everyone!

I can't get my head around how I can add multiple folders (with multiple secrets) to my configuration.

Currently my configuration looks like below and works fine.

It would be great if someone could give me a hint on how I could add another folder with another secret into the configuration.

File: /home/user/.btsync/sync.conf

{

"device_name": "MyDeviceName",

"listening_port" : 8888,

"storage_path" : "/home/user/.btsync",

"pid_file" : "/home/user/.btsync/btsync.pid",

"check_for_updates" : false,

"use_upnp" : false,

"download_limit" : 0,

"upload_limit" : 0,

"webui" : {

//"listen" : "0.0.0.0:8888",

"login" : "admin",

"password" : "password"

},

"shared_folders" :

[

{

"secret" : "mylonglongsecret",

"dir" : "/home/user/BTSync/Share",

"use_relay_server" : true,

"use_tracker" : true,

"use_dht" : false,

"search_lan" : false,

"use_sync_trash" : false,

"known_hosts" :

[

"192.168.1.2:8888"

]

}

]

}

Thanks a lot in advance!

Link to comment
Share on other sites

Thanks Marko!

I missed the "comma"...

Extract from the unoffical FAQ's:

The structure of the shared folder stuff is:

"shared_folders" :

[

{

shared folder 1 variables in here

},

{

shared folder 2 variables in here

},

{

shared folder 3 variables in here

}

]

So all you need to do is copy the code block from your config file which is encapsulated by { } and paste it after the existing one using a comma to separate them. Then it is just a case of editing the value accordingly.

NB. Make sure you don't copy the full shared folder block ie the square brackets. You just want the block inside.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.