jcollie

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by jcollie

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