0

I asked this question on AskUbuntu, but it's not getting any traction there... So I'll try here as well:

I have a homebrew headless NAS running 12.04.

In it I have a bunch of disks that are presented as a Samba share thanks to Greyhole. If I want to do anything to the files within this share, I must do it through greyhole so that everything is updated properly. Thus, the share must be mounted locally and then accessed from there if I want to work on the files from the local machine. I do this mounting automatically thanks to these instructions.

I also have Deluge installed that takes care of all my torrenting needs. Deluge's default download location is in this share, so that all the downloads are immediately available to the rest of the network.

Obviously for everything to work, the share must be mounted, otherwise Deluge is going to have a problem downloading to it.

The problem is, it seems like Deluge is starting before the shares are mounted when the system boots. So downloading/seeding does not continue automatically after boot. I have to log in and force a manual rescan and start on each torrent otherwise all the torrents just hangs on the error.

Is there a way I can make deluge start after the shares got properly mounted? I looked into Upstart's emits functionality but I cannot seem to get it to work properly. Any advice?

1 Answer 1

0

My raspberry pi server depends on an externally mounted USB HDD for storing my mailboxes, MySQL databases and several other things that have been moved to HDD in order to prevent SDCARD disk writes to make it last longer.

At boot time I run a script that checks for the existence of certain directories on HDD to confirm that it has been properly mounted. When it sees those directories it will remove a (previously sets) lock file from /dev/shm/ so that other applications can determine the state of the mount and decide whether it's okay to start. If the lock file is still there the app will not be started but just wait 60 seconds and try again until the lockfile has been removed.

It's all very basic shell scripting and your situation will be very different from mine so I haven't provided any code examples at this stage.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .