peterd

Can I use advanced options in a Linux conf?

Recommended Posts

I dumped the sample configuration, and it says this:

// Advanced preferences can be added to config file.

// Info is available in BitTorrent Sync User Guide.

So I pulled the options from the guide, and attempted to add them to the config file (using the ppa from here).

I'm no JSON expert, but I fail to see where I'm going wrong:

{

"pid_file" : ".btsync.pid",

"storage_path" : ".btsync",

"listening_port" : 0,

"check_for_updates" : true,

"use_upnp" : true,

"download_limit" : 0,

"upload_limit" : 0,

“disk_low_priority” : true,

“lan_encrypt_data” : false,

“lan_use_tcp” : true,

“rate_limit_local_peers” : false,

"webui" :

{

"listen" : "127.0.0.1:9999"

}

}

When starting with those options I get the following error:

Error while parsing config file: Unexpected end of config file (are you missing '}') ?

If I delete the 4 "advanced" options, it works again. Are they supposed to go in their own section? If so, what does that look like?

TIA,

Peter

Share this post


Link to post
Share on other sites

You are using the wrong quotes. Take a close look at them. Most of them are straight, those are the correct ones. Some are titled a bit, those are wrong. Did you use Word to edit your config?

Share this post


Link to post
Share on other sites

Solved it, here what my conf looks like :


{
"device_name": "******",
"listening_port" : 0, // 0 - randomize port
/* storage_path dir contains auxilliary app files
if no storage_path field: .sync dir created in the directory
where binary is located.
otherwise user-defined directory will be used
*/
"storage_path" : "*******",
// uncomment next line if you want to set location of pid file
"pid_file" : "*********",

"check_for_updates" : true,
"use_upnp" : true, // use UPnP for port mapping

/* limits in kB/s
0 - no limit
*/
"download_limit" : 0,
"upload_limit" : 0,
/* remove "listen" field to disable WebUI
remove "login" and "password" fields to disable credentials check
*/
"webui" :
{
"listen" : "******",
"login" : "******",
"password" : "*******"
},
// Advanced preferences can be added to config file.
// Info is available in BitTorrent Sync User Guide.
"disk_low_priority" : true,
"lan_encrypt_data" : false,
"lan_use_tcp" : false,
"rate_limit_local_peers" : false
}

Hope it'll help.

Share this post


Link to post
Share on other sites

You are using the wrong quotes. Take a close look at them. Most of them are straight, those are the correct ones. Some are titled a bit, those are wrong. Did you use Word to edit your config?

This one is also not working...


// Advanced preferences can be added .....
// Info is available in ....
"disk_low_priority": false,
"lan_encrypt_data": false,
"lan_use_tcp": true
}

I still don't know what's wrong about it.

Share this post


Link to post
Share on other sites

Fixed it!!

Only added a comma


// Advanced preferences can be added .....
// Info is available in ....
,
"disk_low_priority": false,
"lan_encrypt_data": false,
"lan_use_tcp": true
}

Share this post


Link to post
Share on other sites

You are using the wrong quotes. Take a close look at them. Most of them are straight, those are the correct ones. Some are titled a bit, those are wrong. Did you use Word to edit your config?

Good catch! No, I did not use Word, but I did copy the syntax directly from the PDF. Unfortunately I did not notice the curly quotes in the original, and furthermore assumed that when I pasted it into the terminal that the double-quotes I was seeing were the right ones (they certainly looked right).

Fixing the quotes did the trick. Thanks everyone. :)

Share this post


Link to post
Share on other sites

Good catch! No, I did not use Word, but I did copy the syntax directly from the PDF. Unfortunately I did not notice the curly quotes in the original, and furthermore assumed that when I pasted it into the terminal that the double-quotes I was seeing were the right ones (they certainly looked right).

Fixing the quotes did the trick. Thanks everyone. :)

yes if you copy from the pdf you get this, but if you past the config to a json editor you can spot the difference immediately.

Share this post


Link to post
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.