Originally published at: http://www.howtogeek.com/146410/how-to-automate-your-always-on-raspberry-pi-download-box/
We recently showed you how to turn your Raspberry Pi into a 24/7 low-power downloading machine. Now we’re back to show you how to make the system almost completely hands off with awesome automation tools.
I can't seem to get the script for auto starting Sick Beard to work. I was able to download the script, moved it to my Init.d folder, made it executable, and then updated the init.d. After reboot it never comes up. I was able to get it to autoload using CronTab with the @reboot option. Just wondering if anyone had any ideas why the script you posted wouldn't work. If i try to run the script using ./sickbeard I get a "sickbeard user doesn't exist error.....Hmm
I was also unable to get this script to run SickBeard on boot. Can you share details on how you got it working?
I hasn't been able to get it to work either. Can't seem to figure out what is wrong. Is there any help to find here?
The only thing I couldn't get to work was Sick Beard at startup. Whenever I tried the script that was on the how to, I would get a "sickbeard user doesn't exist" error. I even tried adding a sickbeard user and it didn't work. I eventually just added the SickBeard.py script to my crontab. Type crontab -e, and then paste the below at the bottom.
@reboot python /home/pi/Sick-Beard/SickBeard.py
This just said every time I restart the Pi it starts SickBeard. It's been running like this for a few days and I have rebooted a few times and it always works. I'm sure there are reasons not to run it this way so if anyone has a better way, please share. Hope this helps
I got it to work by modifying line 15 to this:
/usr/bin/sudo -u pi -H /home/pi/Sick-Beard/SickBeard.py
It seems to be working on restart now so that's good. I'm having similar problems with the CouchPotato script now though. Getting this error message when I try to run init.d/couchpotato start:
start-stop-aemon: unable to chdir() to /usr/local/sbin/CouchPotatoServer/ (No such file or directory)
I think I'm going to rewrite the script to be more similar to the SickBeard one. Anyone know why these two scripts are so different, and why it would be a good/bad idea to alter them?
Wish I could help you.. but would certainally be interested in your progress..
would be nice to know if others have gotten this to work as discribed.
Jaron you are the man. Seems like the supplied script was trying to link to a sickbeard user that didn't exist. Changing the username and SickBeard.py location on line 15 worked like a charm. The only thing I wonder about is the data directory and the ini linked to in the script that we took out. Do you think they are needed? Anyway I have SickBeard up and running as a true daemon now and I appreciate your help. I haven't messed with CoachPotato yet but when I do I'll check in here and let you know how I progress.
I'm having a real problem with this tutorial also. I follow up to
sudo apt-get install git-core
Which goes OK but when I type “git –version” at the command prompt I get, -bash: git -version: command not found So if I type git -version I get,
Unknown option: -version
usage: git [--version] [--exec-path[=]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=] [--work-tree=] [--namespace=]
[-c name=value] [--help]
So I try to re install with
sudo apt-get install git-core
to be told
git-core is already the newest version.
So it must be installed. So, ignoring this "problem" I move on.
No probs till later,
Does run the script and I can get into Sickbeard through the web interface. I do, then, lose the command prompt.
Closing Putty ends the Sickbeard session so I lose the web interface. Restarting again leaves me back at the start with Sickbeard forgetting all I'd input.
I can't then do this..
cp autoProcessTV.cfg autoProcessTV.py sabToSickBeard.py /media/USBHDD1/shares/SABnzbd/scripts
sudo wget -O /etc/init.d/sickbeard/ http://www.howtogeek.com/geekers/up/sshot5161b529c109d.txtsudo chmod 755 /etc/init.d/sickbeard
sudo update-rc.d sickbeard defaults
All the time Putty is connected I can still get into Sickbeard, but it dies once Putty is closed.
The article says:
sudo apt-get python-cheetah
Change this to:
sudo apt-get install python-cheetah
It caught me out for a little bit, as I'm not a UNIX whiz.
Thanks for pointing that out. Updated the post.
When I enter the following line...
sudo update-rc.d sickbeard defaults
...I get this error:
update-rc.d: error: initscript does not exist: /etc/init.d/sickbeard
Edit: I should say I've carefully followed the instructions up till this point. The "/etc/init.d/sickbeard" directory exists but I seem to be missing "initscript".
Can this be done on the 256mb pi or does it need to be the 512mb version?
Also, once it is set up as an automated downloader, can it also act as a uPnP server to send those downloaded files to other devices?
Thanks to CD for advising about the crontab option. Despite trying the other recommended solutions to the sickbeard "start on boot" requirement, this, in the end was the only thing that I could get working. And because I can understand how that works I can (probably) use that for the CouchPotato launch also (it doesn't appear to auto start either).
I found that too Geejayz. I did try the crontab thingy on Couchpotato (but unlike you, I don't understand anything) but I couldn't get Couchpotato to auto start. If you do work it out please share
Use putty.exe to connect to your Pi and then from the cursor type
This brings you into the cron file and then from there edit it to add this to the bottom;
@reboot python /home/pi/CouchPotatoServer/CouchPotato.py
Unfortunately, it won't let me upload an image URL at the moment.
Once you do that, reboot your PI by powering it off and on again or use;
Give it a good five minutes or so to load everything up then check if everything is running in the following order;
http://192.168.1.15:8080/sabnzbd/ (this should load your sabnzbd interface and show what is pending or downloading)
http://192.168.1.15:8081/home/ (this should load your sickbeard interface)
See post below for rest as I can only put two links in one post.
http://192.168.1.15:5050/ (this should load your couchpotato interface)
Note, your IP address will probably be different (the 192.168.1.XX part) depending on what static IP address you gave your unit in the earlier tutorial.
If the interfaces don't load then it means that they are not being autolaunched when your PI boots up.
Many thanks Geejayz. That got it. I had tried what you suggested before but I used this line, @reboot python /home/pi/CouchPotato/CouchPotato.py, I left out the Server part. Now working a treat.
I've tried to use the guide in order to use couchpotato on boot but did'nt succeed to make it work
after writing the command
"sudo update-rc.d couchpotato defaults"
update-rc.d: using dependency based boot sequencing
I've also tried to add Geejayz commands into the "crontab -e" and nothing was changed.
if it matters, i'm using raspbmc and not raspbian. and this is the first time i'm trying to use unix so please be as informative as you can
next page →