jfontana Posted May 12, 2013 Report Share Posted May 12, 2013 I've read different documents that talk about the config file but I haven't been able to see any information about setting things up so that BitTorrent Sync starts automatically whenever the server reboots.Can anybody tell me how to do this or point me to documentation that explains how to do it?Thanks Quote Link to comment Share on other sites More sharing options...
Disappointed Cat Posted May 12, 2013 Report Share Posted May 12, 2013 All you need is an init.d script.Someone here wrote one that supported mutiple users but that one didn't work for me so I made a simple one.Here: http://pastebin.com/Jcc9MWrb (Set the 4 variables at the beginning.)Create a btsync file in /etc/init.d then set it up using 'update-rc.d btsync defaults'. Quote Link to comment Share on other sites More sharing options...
jfontana Posted May 12, 2013 Author Report Share Posted May 12, 2013 Thanks Lightning for the quick response. I have one question about your script. From what I see you have to write the path to where your sync.pid lives. Would this be the same as the btsync binary? (I have it in /usr/bin). That's the same directory where the 'config.json' file (which I still haven't created) lives, right? Thanks again for your help.JM Quote Link to comment Share on other sites More sharing options...
Disappointed Cat Posted May 12, 2013 Report Share Posted May 12, 2013 By default the pid file is in the .sync directory in your user home dir.I recommend you keep the config file, and all the automatically created stuff in one folder (i.e. the .sync).BTW you don't need the pid file to start and stop the script. It's for the status command to check if it's running.That could be improved a bit and then a restart command would be pretty simple too. Quote Link to comment Share on other sites More sharing options...
jfontana Posted May 12, 2013 Author Report Share Posted May 12, 2013 Thanks again! 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.