I have a raspberry pi, which is brilliant. It runs raspbmc and does all sorts of things for me as it is permanently connected to my network and runs 24/7 as a torrent server etc.
I recently discovered Bittorrent Sync, which I now have running to sync my photography archive on my laptop to the 2TB external drive on the pi. Unfortunately the pi keeps the external drive from spinning down properly as this btsync program keeps the drive active even if there are no seeds connected to it.
My laptop is rarely on, but when it is I want this process to be run. When the laptop drops off the network I want the process to be stopped.
How do I create a script that does that? I suspect a cron job that runs every 10 minutes or so, checks whether the laptop is visible (don't know how to do this), and then starts the btsync service, stopping it when the laptop stops being online.
Any advice on how to do this would be appreciated! I don't really know where to start
I recently discovered Bittorrent Sync, which I now have running to sync my photography archive on my laptop to the 2TB external drive on the pi. Unfortunately the pi keeps the external drive from spinning down properly as this btsync program keeps the drive active even if there are no seeds connected to it.
My laptop is rarely on, but when it is I want this process to be run. When the laptop drops off the network I want the process to be stopped.
How do I create a script that does that? I suspect a cron job that runs every 10 minutes or so, checks whether the laptop is visible (don't know how to do this), and then starts the btsync service, stopping it when the laptop stops being online.
Any advice on how to do this would be appreciated! I don't really know where to start