InitScript Delay

General support for problems installing or using Deluge
Post Reply
Hillside
New User
New User
Posts: 4
Joined: Wed Jan 16, 2013 11:27 am

InitScript Delay

Post by Hillside »

Good day!

I am a new user of Deluge, and I'm loving it!

I am currently running a headless Deluge on Ubuntu 11.10 (XBMCbuntu dist v11 EDEN), using GTKUI to control it within the local network, and the WebUI for controlling it remotely.
I followed the guide available here for the setup, and it worked great!
I also followed this guide for the InitScript, which also worked wonderfully.

However, it takes a few seconds after boot for my external storage to get mounted properly, hence all my downloads get plagued by errors each boot, and I have to manually start them.

I was wondering if there was a way to modify the InitScript in order to delay the start of Deluge by two minutes.

My /etc/init/deluge.conf

Code: Select all

start on (filesystem and networking) or runlevel [2345]
stop on runlevel [016]

env uid=myuser
env gid=mygroup
env umask=000

exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluged -- -d
My /etc/init/deluge-web.conf

Code: Select all

start on started deluge
stop on stopping deluge

env uid=myuser
env gid=mygroup
env umask=027

exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluge-web
Best Regards
Hillside
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: InitScript Delay

Post by Cas »

Try removing or runlevel [2345]
Hillside
New User
New User
Posts: 4
Joined: Wed Jan 16, 2013 11:27 am

Re: InitScript Delay

Post by Hillside »

Thank you for your response.

It seems to no longer start at all on my system once removing

Code: Select all

or runlevel [2345]
Manual start became required.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: InitScript Delay

Post by Cas »

ok subtle bug in the upstart script. replace the start line with this:

Code: Select all

start on filesystem and stopped networking
Hillside
New User
New User
Posts: 4
Joined: Wed Jan 16, 2013 11:27 am

Re: InitScript Delay

Post by Hillside »

Thank you once again for taking the time to help me.
I tried it, but sadly it won't make my problems go away.

I can live with it though, I was just curious if I could rid myself of it easily.

Best Regards
Hillside.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: InitScript Delay

Post by Cas »

How are you mounting your external drive?
Hillside
New User
New User
Posts: 4
Joined: Wed Jan 16, 2013 11:27 am

Re: InitScript Delay

Post by Hillside »

Through no effort of my own.
It's just plugged in permanently (USB 2.0).
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: InitScript Delay

Post by Cas »

For Ubuntu to use the drive it needs to be mounted, normally for a usb drive this will only happen when the user opens the drive manually for the first time. If you need it to be done automatically on boot so that Deluge can access it, you need to have it mounted by adding it to your fstab file.
Post Reply