[SOLVED] - What's wrong with my config??


Recommended Posts

I am getting this error when i try to start btsync


Error while parsing config file: Unexpected end of config file (are you missing '}') ?
* start-stop-daemon: failed to start `/usr/bin/btsync' [ !! ]
* ERROR: btsync failed to start

I am trying to start it on gentoo via


/etc/init.d/btsync start

my init.d script (if needed):


#!/sbin/runscript
PIDFILE="/run/btsync/btsync.pid"
depend() {
need localmount net
}
start() {
if [ ! -d /run/btsync ]; then
mkdir /run/btsync
chown "${BTSYNC_USER}:${BTSYNC_GROUP}" /run/btsync
fi
ebegin "Starting btsync"
start-stop-daemon \
--start \
--pidfile "${PIDFILE}" \
--user "${BTSYNC_USER}" \
--group "${BTSYNC_GROUP}" \
--exec /usr/bin/btsync \
-- --config /etc/btsync.conf
eend $?
}
stop() {
ebegin "Stopping btsync"
start-stop-daemon \
--stop \
--pidfile "${PIDFILE}"
eend $?
}

/etc/btsync.conf:


{
"device_name": "Tsukihi",
"listening_port" : 28565,
"storage_path" : "/var/btsync/*USER*/.sync",
"pid_file" : "/run/btsync/btsync.pid",
"check_for_updates" : true,
"use_upnp" : true,
"webui" :
{
"listen" : "10.10.10.249:9999",
}
[
{
"use_relay_server" : true,
"use_tracker" : true,
"use_dht" : false,
"search_lan" : true,
"use_sync_trash" : true,
}
]
}

/etc/conf.d/btsync has the right user and group in it.

Link to comment
Share on other sites

@LazyWolf you where right but there was more stuff i needed to do.


{
"device_name": "Tsukihi",
"listening_port" : 28565,
"storage_path" : "/var/btsync/*USER*/.sync",
"pid_file" : "/run/btsync/btsync.pid",
"check_for_updates" : false,
"use_upnp" : false,
"webui" :
{
"listen" : "10.10.10.249:9999"
}
}


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.