Howto: Delay Start sabnzbdplus in Ubuntu

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
RKM
Jr. Member
Jr. Member
Posts: 64
Joined: January 31st, 2010, 4:33 pm

Howto: Delay Start sabnzbdplus in Ubuntu

Post by RKM » January 27th, 2011, 11:41 am

I'm running a distro of XBMC LIVE that has sabnzbd+ pre-installed.  It runs from init.d

The problem is that I have a share mounting in my rc.local file, which runs after sabnzbd+.

SAB needs that share, and if it does not see the share, it will alter back to the default.

To contend with this issue, I've added a "sleep 60" to the sabnzbdplus script located under init.d -- unfortunately that doesn not address the problem.

Not being good with Linux, I'm not sure where to look to determine what's wrong -- or whether there is a better method.

Anyone have any ideas on where I should look next?

Thank you in advance,
RKM

User avatar
jcfp
Release Testers
Release Testers
Posts: 885
Joined: February 7th, 2008, 12:45 pm

Re: Delay Start sabnzbdplus in Ubuntu

Post by jcfp » January 27th, 2011, 3:31 pm

1) Undo any changes to the init.d script;
2) Disable (but not remove) the sabnzbdplus service, something like sudo update-rc.d sabnzbdplus disable might just do the job;
3) Hook up a script to /etc/rc.local to start the service after all. Store it in some place that is accessible during boot (i.e. not on network shares, usb drives or in encrypted home dirs) and make sure it's executable. An example script is given below. The test done here is to check for the existence of some directory, but it could really be anything. Modify as needed.

Code: Select all

#!/bin/sh

DIR=/home/jp/.sabnzbd

while [ ! -d "$DIR" ]; do
	sleep 120
done

/etc/init.d/sabnzbdplus start

RKM
Jr. Member
Jr. Member
Posts: 64
Joined: January 31st, 2010, 4:33 pm

Re: Delay Start sabnzbdplus in Ubuntu

Post by RKM » January 29th, 2011, 3:38 pm

Wow, that worked like a charm! 

Thank a million for the easy to follow instructions and going so far as to give me the script, and I learned few things in the process!

narddawg314
Newbie
Newbie
Posts: 18
Joined: February 9th, 2014, 9:33 pm

Re: Howto: Delay Start sabnzbdplus in Ubuntu

Post by narddawg314 » June 23rd, 2014, 10:56 am

can confirm this works. I use it on my server at home as well.

Post Reply