eseelke Posted May 11, 2013 Report Share Posted May 11, 2013 I decided to use the conf file rather than the webui today for a little bit more security. But, when I enter my info into the file, btsync will not start. I get the following error:Error while parsing config file: Unexpected end of config file (are you missing '}') ?Here is my conf file:{"device_name": "Linux Server","listening_port" : 0,"storage_path" : "/bin/.sync",// "pid_file" : "/var/run/syncapp/syncapp.pid","check_for_updates" : true,"use_upnp" : true,"download_limit" : 0,"upload_limit" : 0,"shared_folders" :[{// use /bin/btsync --generate-secret in command line to create new secret "secret" : "SECRETKEY", "dir" : "/home/folder1", "use_relay_server" : true, "use_tracker" : true, "use_dht" : false, "search_lan" : true, "use_sync_trash" : false, "known_hosts" : [ "192.168.1.2:44444", "myhost.com:6881" ]}{ "secret" : "SECRETKEY", "dir" : "/home/folder2", "use_relay_server" : true, "use_tracker" : true, "use_dht" : false, "search_lan" : true, "use_sync_trash" : false, "known_hosts" : [ "192.168.1.2:44444", "myhost.com:6881" ]}{ "secret" : "SECRETKEY", "dir" : "/home/folder3", "use_relay_server" : true, "use_tracker" : true, "use_dht" : false, "search_lan" : true, "use_sync_trash" : false, "known_hosts" : [ "192.168.1.2:44444", "myhost.com:6881" ]}]}Any ideas as to what is not right?Eddie Quote Link to comment Share on other sites More sharing options...
BtbN Posted May 11, 2013 Report Share Posted May 11, 2013 My guess is that there are "," missing after the first two shared folders. Quote Link to comment Share on other sites More sharing options...
eseelke Posted May 11, 2013 Author Report Share Posted May 11, 2013 Any idea where I would put that?This conf file works:"device_name": "Linux Server","listening_port" : 0,"storage_path" : "/bin/.sync",// "pid_file" : "/var/run/syncapp/syncapp.pid","check_for_updates" : true,"use_upnp" : true,"download_limit" : 0,"upload_limit" : 0,"shared_folders" :[{// use /bin/btsync --generate-secret in command line to create new secret "secret" : "SECRETKEY", "dir" : "/home/folder1", "use_relay_server" : true, "use_tracker" : true, "use_dht" : false, "search_lan" : true, "use_sync_trash" : false, "known_hosts" : [ "192.168.1.2:44444", "myhost.com:6881" ]}]} Quote Link to comment Share on other sites More sharing options...
hawibtsync Posted May 11, 2013 Report Share Posted May 11, 2013 Perhaps between '}' and '{'?},{ Quote Link to comment Share on other sites More sharing options...
rdebath Posted May 12, 2013 Report Share Posted May 12, 2013 Actually, I'd suggest some of the hacks below to make it work a bit more like a proper configuration file format (rather than whatever json is).So there's commas at the start of every line so you can c&p or comment out any line you like without breaking the format.The "shared_folders" sections are completely independent. so you just repeat the section if you have another share or comment out if you want to remove one.The webui bit is on a single line so it's easy to comment out with the "/*" at the end of the line to work around the problem that the webui turns itself off when there's a share in the file.There's not much I can do about the "line noise" like collection of special characters that are required though.Wishlist request: Use simple format that's nowhere near as easy to get wrong!{ "device_name": "My Test Host","listening_port" : 12345,"storage_path" : "/home/btsync/syncstate","check_for_updates" : false,"use_upnp" : false,"download_limit" : 0,"upload_limit" : 0// , "webui" : { "listen" : "0.0.0.0:8888", "login" : "admin", "password" : "Pa55w0rD" } /*,"shared_folders" :[{ "secret" : "R27WAH4LQCGDFOGS7NLQYLQPXW5TRCW5" ,"dir" : "/home/btsync/cats" ,"use_relay_server" : false ,"use_tracker" : true ,"use_dht" : true ,"search_lan" : true ,"use_sync_trash" : true}],"shared_folders" :[{ "secret" : "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO" ,"dir" : "/home/btsync/zero" ,"use_relay_server" : false ,"use_tracker" : true ,"use_dht" : true ,"search_lan" : true ,"use_sync_trash" : false}]// End of WEBUI comment */// ,"lan_use_tcp" : true/*,"shared_folders" :[{ "secret" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" ,"dir" : "/home/btsync/zero" ,"use_relay_server" : false ,"use_tracker" : true ,"use_dht" : true ,"search_lan" : true ,"use_sync_trash" : false}]*/} Quote Link to comment Share on other sites More sharing options...
hawibtsync Posted May 12, 2013 Report Share Posted May 12, 2013 OPs problem is the list of Shared Folders. He's missing the comma between each Shared Folder definition. Quote Link to comment Share on other sites More sharing options...
eseelke Posted May 12, 2013 Author Report Share Posted May 12, 2013 Thank you rdebath, your example worked perfectly.I was missing the comma and the square brackets before and after each shared folders. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.