aaronk Posted February 25, 2016 Report Share Posted February 25, 2016 Quote Link to comment Share on other sites More sharing options...
aaronk Posted February 25, 2016 Author Report Share Posted February 25, 2016 I just completed a clean install of Ubuntu 15.10. I did all available updates. I installed btsync by way of the new official apt-get. I am able to use the commands to start and stop the service. The problem is I am trying to make it auto start. There is an init.d script in place that is very different from what other people are using (see above). This may be a rookie mistake but I can't find any information because of how the new be official apt-get option is. Quote Link to comment Share on other sites More sharing options...
iswrong Posted February 25, 2016 Report Share Posted February 25, 2016 Did you try to add the script to the correct runlevels? sudo update-rc.d btsync defaults Since Ubuntu 15.10 has systemd, you can also use the systemd unit to automatically start Sync: sudo systemctl enable btsync Quote Link to comment Share on other sites More sharing options...
aaronk Posted February 26, 2016 Author Report Share Posted February 26, 2016 aaron@ubuntu:~$ sudo systemctl enable btsync [sudo] password for aaron: Synchronizing state of btsync.service with SysV init with /lib/systemd/systemd-sysv-install... Executing /lib/systemd/systemd-sysv-install enable btsync The unit files have no [Install] section. They are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...). Quote Link to comment Share on other sites More sharing options...
iswrong Posted February 26, 2016 Report Share Posted February 26, 2016 Did you try update-rc.d ? Quote Link to comment Share on other sites More sharing options...
aaronk Posted February 26, 2016 Author Report Share Posted February 26, 2016 i tried sudo update-rc.d btsync defaults Quote Link to comment Share on other sites More sharing options...
aaronk Posted February 26, 2016 Author Report Share Posted February 26, 2016 i am using the server version of Ubuntu 15.10. Could that have an effect on being able to use this command? sudo systemctl enable btsync Quote Link to comment Share on other sites More sharing options...
cjsheets Posted February 28, 2016 Report Share Posted February 28, 2016 You can create a unit file for btsync (probably should be done automatically by the deb package). Create the file: /etc/systemd/system/btsync.service Containing: [Unit] Description=Bittorent Sync service After=network.target [Service] Type=forking User=btsync Group=btsync ExecStart=/usr/bin/btsync Restart=on-abort [Install] WantedBy=multi-user.target Once that file is in place enabling the service should work sudo systemctl enable btsync Quote Link to comment Share on other sites More sharing options...
Moe Posted February 29, 2016 Report Share Posted February 29, 2016 On 28.2.2016 at 3:35 AM, cjsheets said: You can create a unit file for btsync (probably should be done automatically by the deb package). Create the file: /etc/systemd/system/btsync.service Containing: [Unit] Description=Bittorent Sync service After=network.target [Service] Type=forking User=btsync Group=btsync ExecStart=/usr/bin/btsync Restart=on-abort [Install] WantedBy=multi-user.target Actually that won't work 100%. You forgot to add the configuration file to the ExecStart command. It should say this: ExecStart=/usr/bin/btsync --config /etc/btsync/config.json Otherwise btsync will create a new syncdata folder and not use any of your settings you have configured in your config file. Quote Link to comment Share on other sites More sharing options...
aaronk Posted February 29, 2016 Author Report Share Posted February 29, 2016 An update to this issue. Moe i will give that a try. Thanks There seems to be a confirmed bug in the official debian installation method. Quote Link to comment Share on other sites More sharing options...
RomanZ Posted March 4, 2016 Report Share Posted March 4, 2016 @aaronk Fixed now. Reinstall package and systemctl enable should be working fine. Quote Link to comment Share on other sites More sharing options...
aaronk Posted March 5, 2016 Author Report Share Posted March 5, 2016 (edited) @Roman Z that made it work and boot at start. my next part I am working on is getting permissions fixed. I tried using this command hoping to get the user running the service to change to pi and received this message. pi@raspberrypi:~ $ sudo systemctl --user start btsync Failed to get D-Bus connection: Connection refused Edited March 5, 2016 by aaronk Quote Link to comment Share on other sites More sharing options...
RomanZ Posted March 5, 2016 Report Share Posted March 5, 2016 @aaronk Googling around indicates that the issue is in your stripped installation of Debian. systemctl depends on 2 other packages: libpam-systemd and dbus. Its very likely you are missing one of them and just need to install it with apt-get. Quote Link to comment Share on other sites More sharing options...
aaronk Posted March 5, 2016 Author Report Share Posted March 5, 2016 @Roman Z I ran across this while i was working on this this issue. Unfortunately installing this package didnt resolve it. I did a clean install to test this. I do believe that a missing package could be an issue though. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.