Jump to content

Please help with starting sab/couchpotato/sickbeard at boot


1gr8ftoy

Recommended Posts

I  am using the plugins from http://lime-technology.com/forum/index.php?topic=14760.0

 

My data is in my array so of course I need the scripts to delay starting.  I tried the installplg ... | at now +1 minute, that did nothing for me.  So I wrote a script that I would think should fix my problems....unfortunately it doesn't.  I am wondering if it is a permission or running as a specific account issue maybe.  Below is my script, output logs and go file.  If I run start.sh from the command line after the box is started, it works perfectly.

 

go file

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

# Install/start simpleFeatures webGui replacement
installpkg /boot/extra/simpleFeatures-0.9b-unraid-speeding_ant.tgz

# Install plugins which require access to array
/boot/extra/delayed/start.sh &

# Make ffmpeg accessible for iOS streaming
echo "/usr/local/plex/Resources" >> /etc/ld.so.conf
ldconfig

unraid_notify start

 

start.sh

#!/bin/bash

# Start logging
echo "$(date): Delayed start script started" > /var/log/delayed_startup
echo "$(date): Delayed start script started" > /var/log/delayed_startup_details

# Do nothing until array comes online and ApplicationData folder
# is available
while true
do
  [ -d /mnt/user/ApplicationData ] && break

  echo "$(date): ApplicationData folder not available yet, sleeping 20 seconds" >> /var/log/delayed_startup
  sleep 20
done

# Install all plg files in the delayed folder
echo "$(date): Installing plugins..." >> /var/log/delayed_startup

FILES=/boot/extra/delayed/*.plg
for f in $FILES
do
  echo "$(date): Installing plugin $f" >> /var/log/delayed_startup
  installplg $f >> /var/log/delayed_startup_details
done

# Log and exit script
echo "$(date): Script completed, exiting now" >> /var/log/delayed_startup

 

delayed_startup log (output from this script directly)

Wed Feb 15 20:26:38 PST 2012: Delayed start script started

Wed Feb 15 20:26:38 PST 2012: ApplicationData folder not available yet, sleeping 20 seconds

Wed Feb 15 20:26:58 PST 2012: Installing plugins...

Wed Feb 15 20:26:58 PST 2012: Installing plugin /boot/extra/delayed/Plex-media-server-noarch-0.9.5.2-ds.plg

Wed Feb 15 20:26:58 PST 2012: Installing plugin /boot/extra/delayed/couchpotato-0.5-i468-bw.plg

Wed Feb 15 20:26:58 PST 2012: Installing plugin /boot/extra/delayed/sabnzbd-0.4c-i468-bw.plg

Wed Feb 15 20:26:58 PST 2012: Installing plugin /boot/extra/delayed/sickbeard-0.4a-i468-1bw.plg

Wed Feb 15 20:26:58 PST 2012: Script completed, exiting now

 

delayed_startup_details log (output from each plugin as it is installed)

Wed Feb 15 20:26:38 PST 2012: Delayed start script started

 

As you can see it doesn't actually install any of my plugins (I see that I am missing an exiting line from this log now that I am pasting it, my error...the script is not hanging indefinitely).

 

If I run the script in the commandline I get all the text is output at the system installs those plugins inside of that log file.  Also after I do it by hand they show up in web gui. 

 

Someone please help!  Thanks

 

EDIT: I was reading over my post and I noticed that in my log it says all the plugins were installed in the same second, but when I run it by hand it takes about 30 seconds for everything to install...  Is there a log somewhere to see if there is any errors related to the go file?

Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...