TheDurtch

Members
  • Posts

    51
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by TheDurtch

  1. 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.

  2. Seems cool, but bittorrent sync already uses /dev/random (or /dev/urandom, but that's also very secure) to generate secrets and so I don't really see a use for this

    I use it for really long keys since I don't like the short keys it gives me.

    That's not that good.

    You are grabbing huge amounts of data from /dev/random when you only need 256 BITS and then you almost throw away a lot of those bits by encoding the data twice. Luckily BTSync saves you by hashing the long string it gets from you down to 256 bits.

    I encode it twice to get rid the slashes that can appear like so


    user@Kate ~ $ head -c 32 /dev/random | base64
    tisIvd+Shp/aceh+Ax/hVzcrJykTzS6vPwNmfhlgX9g=

    I had problems the last time i had slashes in my secret

    If you want dd to shut up, you need to redirect dd's stderr output like this:


    cat /dev/urandom | dd if=/dev/stdin bs=1 count=128 iflag=fullblock 2>/dev/null | base64 -i | base64

    Thanks worked great I will keep that in mind when I work on more scripts.

    Not sure if it has been fixed yet but I found that when a base64 string used as a key contained backslashes sync would ignore the rest of the key...

    Say your secrete was...

    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\BBBBBBBBBBBBBBBBBBBBBBBB

    I was able to use the key AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

    That was in 1.0. and I haven't tested but I use have a little script in my bin dir...


    #!/bin/bash
    key=`openssl rand 1024 -base64 | tr '/\n' '\0' | tr '+' '\0' | tr '[a-z]' '\0' | tr '=' '\0'`
    echo "A"$key
    exit

    I tried this script and it works but they are only upper cased characters. I like to have mixed case.

    I removed

     tr '[a-z]' '\0' |

    and i like it much better.

    Would you mind if i take the last bit of you r script and added it to mine?

  3. I have written a very simple code that uses /dev/random to generate your secrets

    https://pastebin.com/siAh1ksW

    Let me know what you think or if there are any improvement that can be made. I know it is "slow" but /dev/random is "slow" so that can't be fix and I WON'T use /dev/urandom just for the speed boost.

    EDIT: I would like to be able to "silence" dd cause it will sometime cut my secret in half

    EDIT_EDIT: I just reallized i just mispelled Secret so many times

    EDIT: dd is now quite. Thanks ultramancool.

    EDIT: Thanks LazyWolf for letting me use part of your script.

  4. I just started using the Android version of btsync today and I feel that it works flawlessly, but I feel like it could use a few more features to make it a little better. Just throwing out ideas.

    1. The choice between auto syncing or syncing file like it does right now

    2. Advanced Features

    3. Animated Task Icon when Syncing??

    4. Sync Speed

    Feel free to add your own ideas.

    And this is a feature idea list not a bug list, just has to say that for the people that will post about general unrelated bugs. :P

  5. I get this with your command


    USERNAME@Kate ~ $ ps ax | grep btsync-agent
    2385 ? Ssl 0:00 /usr/lib/btsync-user/btsync-agent --config /etc/btsync-user/btsync-user.conf
    3063 pts/0 S+ 0:00 grep --colour=auto btsync-agent

    so it looks like i am using "/etc/btsync-user/btsync-user.conf"

    it contains.


    GNU nano 2.2.6 File: /etc/btsync-user/btsync-user.conf
    //!/usr/lib/btsync-user/btsync-agent --config
    //
    // configuration for the btsync agent running in the
    // user environment
    {
    "pid_file" : ".btsync.pid",
    "storage_path" : ".btsync",
    "listening_port" : 0,
    "check_for_updates" : false,
    "use_upnp" : true,
    "download_limit" : 0,
    "upload_limit" : 0,
    "webui" :
    {
    "listen" : "127.0.0.1:9999"
    }
    }

    the version i am using

    Screenshot%20from%202013-05-21%2012%3A20%3A53.png

    I got rid of all configs and did a fresh install and rebooted for good measure and still nothing. it's just sitting there connected but not syncing at all.

  6. I am trying to start btsync on my Seagate Net runnning Arch Linux and it spits out "Segmentation fault (core dumped)"

    I am using the ARM version of btsync.

    This is some stuff that i think might help


    $ uname -srvmo
    Linux 3.1.10-18-ARCH #1 PREEMPT Thu Apr 18 00:45:32 UTC 2013 armv5tel GNU/Linux

    Device specs: http://archlinuxarm....gate-goflex-net

    If there is anymore info that you need let me know

    ------EDIT------

    Never mind did something wierd

    Mod feel free to delete post