j0rel
-
Posts
5 -
Joined
-
Last visited
Posts posted by j0rel
-
-
$dpkg --list | grep btsync
ii btsync-user 1.1.69-1~raring amd64 Private network P2P file synchronisation daemon(s)
----
$ cat /usr/lib/btsync-user/btsync-starter
#!/bin/sh
# compute user specific directories
DESTDIR=${HOME}
DATADIR=${DESTDIR}/.btsync
CFGFILE=${DESTDIR}/.btsync.conf
PIDFILE=${DESTDIR}/.btsync.pid
USRFILE=${DESTDIR}/btsync.conf
DEVNAME="$(hostname) - $(whoami)"
# "sedify" replacemnt data
XDATADIR="$(echo ${DATADIR} | sed -e "s/\\//\\\\\//g")"
XPIDFILE="$(echo ${PIDFILE} | sed -e "s/\\//\\\\\//g")"
XDEVNAME="$(echo ${DEVNAME} | sed -e "s/\\//\\\\\//g")"
if pgrep -x btsync-agent -U $(id -u) > /dev/null; then
echo btsync-agent already running
exit 0
else
# move to user's home directory
cd ~
sed \
-e "s/DATADIR/${XDATADIR}/g" \
-e "s/PIDFILE/${XPIDFILE}/g" \
-e "s/DEVNAME/${XDEVNAME}/g" \
> ${CFGFILE} < /etc/btsync-user/btsync-user.conf
if [ -f "${USRFILE}" ]; then
/usr/lib/btsync-user/btsync-agent --config ${USRFILE}
else
mkdir -p ${DATADIR}
/usr/lib/btsync-user/btsync-agent --config ${CFGFILE}
fi
fi
------
$cat ~/btsync.conf
//!/usr/lib/btsync-user/btsync-agent --config
//
// configuration for the btsync agent running in the
// user environment
{
"device_name" : "computername",
"pid_file" : "/home/username/.btsync.pid",
"storage_path" : "/home/username/.btsync",
"listening_port" : 10090,
"check_for_updates" : false,
"use_upnp" : false,
"download_limit" : 0,
"upload_limit" : 0,
"webui" :
{
"listen" : "0.0.0.0:9999"
}
}
------------
$cat ~/.btsync.conf
//!/usr/lib/btsync-user/btsync-agent --config
//
// configuration for the btsync agent running in the
// user environment
{
"device_name" : "computername - username",
"pid_file" : "/home/username/.btsync.pid",
"storage_path" : "/home/username/.btsync",
"listening_port" : 0,
"check_for_updates" : false,
"use_upnp" : true,
"download_limit" : 0,
"upload_limit" : 0,
"webui" :
{
"listen" : "127.0.0.1:9999"
}
}
----------
So, again, it picks up my listen port from ~/btsync.conf but it seems to be taking my device name from ~/.btsync.conf. I have played around a bit and cannot get it to change this behaviour.
-
You must reboot your machine after creating the file in order to make the changes active.
I have (I just rebooted again to be sure), it still shows the default name, which is ($HOSTNAME - $USERNAME). I don't want my first name getting shown to people on large syncs, so this is a problem.
The other parts of the config file seem to be used, ie: listening port, but the "device_name" is ignored, using the ~/.btsync.conf info instead.
-
using ~/btsync.conf it seems to ignore the device name I configured...
-
After updating on ubuntu 13.04 the sync stopped working and sync.log shows a ton of "EncryptionHandler: failed to find decryption key for incoming connection" messages. I tried removing then re-adding the synced folders to no avail. Any ideas?
Same problem, nothing is syncing.
Debian And Ubuntu Legacy Desktop Unofficial Packages For Bittorrent Sync
in Sync General Discussion
Posted
That did it. This is a problem with using a binary settings file, makes it pretty hard to troubleshoot. Thanks for your hard work (flattrd)!