-
-
Save alexsarmiento/6407826 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"device_name": "My Book Live NAS", | |
"listening_port" : 0, // 0 - randomize port | |
"storage_path" : "/DataVolume/cache/btsync/syncStorage", | |
"pid_file" : "/var/run/btsync.pid", | |
"check_for_updates" : true, | |
"use_upnp" : true, // use UPnP for port mapping | |
"download_limit" : 1000, | |
"upload_limit" : 100, | |
"lan_encrypt_data" : false, | |
"rate_limit_local_peers" : true, | |
"lan_use_tcp" : true, | |
//"use_relay_server" : false, | |
//"use_tracker" : false, | |
//"use_dht" : false, | |
"webui" : | |
{ | |
"listen" : "0.0.0.0:8888", | |
"login" : "admin", | |
"password" : "password" | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: btsync | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Should-Start: $network | |
# Should-Stop: $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Multi-user daemonized version of btsync. | |
# Description: Starts the btsync daemon for all registered users. | |
### END INIT INFO | |
DAEMON=/DataVolume/cache/btsync/btsync | |
config=/DataVolume/cache/btsync/btsync.conf | |
start() { | |
if [ -f $config ]; then | |
echo "Starting BTSync" | |
start-stop-daemon -N 19 -I idle -b -o -c root -S -u root -x $DAEMON -- --config $config | |
else | |
echo "Couldn't start BTSync " | |
fi | |
} | |
stop() { | |
dbpid=`cat /var/run/btsync.pid` | |
if [ ! -z "$dbpid" ]; then | |
echo "Stopping btsync" | |
start-stop-daemon -o -c root -K -u root -x $DAEMON | |
fi | |
} | |
status() { | |
dbpid=`cat /var/run/btsync.pid` | |
if [ -z "$dbpid" ]; then | |
echo "btsync : not running." | |
else | |
echo "btsync : running (pid $dbpid)" | |
fi | |
} | |
case "$1" in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
restart|reload|force-reload) | |
stop | |
start | |
;; | |
status) | |
status | |
;; | |
*) | |
echo "Usage: /etc/init.d/btsyncd {start|stop|reload|force-reload|restart|status}" | |
exit 1 | |
esac | |
exit 0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir /DataVolume/cache/btsync/ | |
cd /DataVolume/cache/btsync/ | |
wget -N http://download-lb.utorrent.com/endpoint/btsync/os/linux-powerpc/track/stable -O btsynz_powerpc.tar.gz | |
wget -N https://gist.github.com/alexsarmiento/6407826/raw/btsync.conf | |
wget -N https://gist.github.com/alexsarmiento/6407826/raw/btsyncd | |
tar xvzf btsync_powerpc.tar.gz | |
cp btsyncd /etc/init.d/ | |
chmod 755 /etc/init.d/btsyncd | |
/etc/init.d/btsyncd restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment