jcollie
-
Posts
3 -
Joined
-
Last visited
Posts posted by jcollie
-
-
I've put some files out on GitHub that will let you create a btsync rpm package that will make all of this very easy:
-
You're much better off creating a native systemd unit file. Put the following into a file called /etc/systemd/system/btsync@.service
[Unit]Description=BitTorrent Sync for %i[Service]Type=simpleUser=%iExecStart=/usr/local/bin/btsync --nodaemon --config %h/.sync/sync.confWorkingDirectory=%h[Install]WantedBy=multi-user.target
Copy the btsync binary to /usr/local/bin.
$ mkdir ~/.sync$ btsync --dump-sample-config > ~/.sync/sync.conf
Edit ~/.sync/sync.conf and change the storage_path config entry so that it's pointing to the right directory. You can then start up btsync by running the following command as root:
# systemctl start btsync@username.service
If you want btsync to start up at boot run the following command as root:
# systemctl enable btsync@username.service
Other useful commands:
# systemctl status btsync@username.service btsync@username.service - BitTorrent Sync for username Loaded: loaded (/etc/systemd/system/btsync@.service; disabled) Active: active (running) since Fri 2013-09-27 11:23:38 CDT; 1min 15s ago Main PID: 23277 (btsync) CGroup: /system.slice/system-btsync.slice/btsync@username.service └─23277 /usr/local/bin/btsync --nodaemon --config /home/username/.sync/sync.confSep 27 11:23:38 localhost systemd[1]: Starting BitTorrent Sync for username...Sep 27 11:23:38 localhost systemd[1]: Started BitTorrent Sync for username.
And to restart btsync:
# systemctl restart btsync@username.service
If multiple users want to run BitTorrent Sync on the same system they'll need to make sure that the web UI listens on a unique port.
Comments in the Config File
in Sync General Discussion
Posted
I just noticed that the comments in the config file are not valid JSON:
http://stackoverflow.com/a/4183018/493155
https://plus.google.com/118095276221607585885/posts/RK8qyGVaGSr
The standard JSON module in Python won't process the sample config file, which is why I started looking into this.