The problem: I have an external hard drive and sometimes the driver crashes on startup. It does restart after some time. However my torrent client is also in my startup list and all the data is on the external hard drive. So if the driver fails it fails to find the files and starts downloading them again, eventually it gets an error and so on... So what I want to be able to do is to set up the launcher for the torrent program so that it won't start if the external drive is not present. Is this possible? And how would you go about doing it?


You could write a ShellScript that checks if the external-hd is mounted and if so start the torrent-client something like this...


varCheck='mount | grep "/media/external_hd"'
if [[ ${#varCheck} > 0 ]]
   start torrent-client

and then put this in your autostart

  • How didn't I think of this myself... I was thinking about some sort of one line command that would both check and launch the client. – Homulvas Mar 2 '13 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.