Delay start of sabnzbd+ on Ubuntu (XBMC Live)

Get help with all aspects of SABnzbd
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
subsense
Newbie
Newbie
Posts: 17
Joined: August 22nd, 2009, 3:17 am

Delay start of sabnzbd+ on Ubuntu (XBMC Live)

Post by subsense »

I managed to auto-start sabnzbdplus on an ASrock installed with XBMC Live.
Could not have done this without the great help and howto's here.

But, I need to delay the start of sabnzbdplus.
It looks like the mounts aren't up when I start sabnzbdplus resulting in the following errors:

Code: Select all

2009-09-13 19:59:55,647 ERROR complete_dir directory: /home/xbmc/nas/Unzipt error accessing
2009-09-13 19:59:55,662 ERROR [sabnzbd.misc] Cannot create directory /home/xbmc/nas/nzb/Done
2009-09-13 19:59:55,664 ERROR dirscan_dir directory: /home/xbmc/nas/nzb error accessing
(/home/xbmc/nas is a mount to my nas)

They show up when I give the "sudo reboot" command, or on cold boot.

When I shutdown sabnzbdplus from the webinterface en start it again from the prompt in deamon mode ik get no errors.
I want to delay the startup of sabnzbdplus with a minute to test is this is the cause.

I nicer way is to make an if...then routine orso (if mounts are up, then start sabnzbdplus).
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Delay start of sabnzbd+ on Ubuntu (XBMC Live)

Post by shypike »

How do you start SABnzbd?
If you use some kind of init.d script, you will need to edit that script
and put in a "sleep" or a loop that waits for the mount to complete.
subsense
Newbie
Newbie
Posts: 17
Joined: August 22nd, 2009, 3:17 am

Re: Delay start of sabnzbd+ on Ubuntu (XBMC Live)

Post by subsense »

shypike wrote: How do you start SABnzbd?
If you use some kind of init.d script, you will need to edit that script
and put in a "sleep" or a loop that waits for the mount to complete.
Yes, I use the init.d method. And I was thinking about editing the script.
But I'm not a star in Linux Scripts, so I assume I have to go to the ubuntu fora?
Or is it just the command "sleep "?
User avatar
jcfp
Release Testers
Release Testers
Posts: 989
Joined: February 7th, 2008, 12:45 pm

Re: Delay start of sabnzbd+ on Ubuntu (XBMC Live)

Post by jcfp »

I can't really guestimate what would happen if one puts a (possibly) infinitely looping sleep statement in an init script, so try the following.

1. Disable the normal auto-startup:

Code: Select all

sudo sysvconfig --disable sabnzbdplus
2. Create a file with a script like this (obviously, you should place it outside the directory you're testing for):

Code: Select all

while [ ! -d /YOUR/DIR/HERE ]; do sleep 10; done
/etc/init.d/sabnzbdplus start
3. Make things run on startup by adding a line to /etc/rc.local:

Code: Select all

/bin/sh /PATH/TO/YOUR/SCRIPT.sh &
subsense
Newbie
Newbie
Posts: 17
Joined: August 22nd, 2009, 3:17 am

Re: Delay start of sabnzbd+ on Ubuntu (XBMC Live)

Post by subsense »

Thanks,

This is a good start for me! I will let my progress know.
Post Reply