I use this (http://code.google.com/p/spindown/) to spindown and monitor the disks. When i stop the deamon with your script disk accessing is stopped, when i start the deamon, disks are accessed again about every 10 seconds.
Running the deamon with btsync --config spins tje disks up every 10 minutes as programmed by the developers to scan for file changes.
So it's really start-stop-daemon's fault. I'll investigate why this is happening.
This is how I start it as a system job with ubuntu (last LTS version, couldn't remember number) using upstart.
1. Create btsync.conf on /etc/init.d/
2. file contains 2 lines:
# home in my setup is another hard drive.
start on mounted MOUNTPOINT=/home TYPE=ext4
# starts as non-root user
exec start-stop-daemon --start -c myuser --exec /home/myuser/btsync
3. this satisfies my needs.
Sweet! Despite the need to have a separate copy of btsync's binary, it's very simple and good to go!
Upstart has its way to track the daemon's PID and I'm not sure if it can handle multiple PIDs. To run btsync for multiple users we need to specify two services, something like btsync-all and btsync-user. btsync-all is going to start a btsync-user for every user and let upstart control the PID generated in btsync-user instance. (I'm not an Upstart specialist, so I can be very wrong in this case)
Another good thing to do is a safety check for all configuration files to prevent the execution of btsync if webui is enabled and the same port number appears in some of them.