Kode Wrote:Heh, well here is the guide so far, needs a bit of a tidy up. http://www.lockstockmods.net/2010/06/03/...sickbeard/
Very nice tutorial. Although I had sickbeard already running I got some new ideas from your post. One came from the commands you posted for updating sickbeard. So I came up with a shell script which automates the whole updating process for people with an unRAID system or ubuntu users that dont want to install git.
There are only two conditions for using this script:
1. Your sickbeard folder has to be named "sickbeard.
2. You to adapt line 4 of the script to make it running on your system. You have to set path=/home/user to the folder path of the PARENT directory of your sickbeard installation (the directory in which the "sickbeard" folder is located). Note that there is no "/" at the end of the path information as it will not function otherwise.
You run the script by typing: sh /path/to/script/NameOfScript
I named it update_sickbeard, but any name will do.
So what does the script do?
1. It gets your login information from your autoProcessTV.cfg file and then shuts down sickbeard.
2. Downloads the newest sickbeard version, extracts it and makes a backup copy of your current installation named sickbeard_backup. For this reason, IF SOMETHING GOES WRONG, DONT RUN THE SCRIPT DIRECTLY A SECOND TIME. First save you sickbeard.db, config.ini and autoProcessTV.cfg in another folder. Otherwise you might loose the files.
3. The script then copies sickbeard.db, config.ini and autoProcessTV.cf into the newly downloaded sickbeard folder, deletes the old sickbeard folder and renames the new one to "sickbeard".
4. Sickbeard is started as daemon with: nohup python SickBeard.py &
If you want to use this script, just copy the text below into a file:
Code:
#!/bin/sh
# Required setting: Absolute path to parent directory of sickbeard folder.
path=/home/user
# Optional setting to switch branch. DONT CHANGE IF YOU DONT KNOW WHAT THAT MEANS!
branch=master
# Get webgui access settings from autoProcessTV (needs to be set up) and shutdown sickbeard.
host=`echo | grep 'host=' $path/sickbeard/autoProcessTV/autoProcessTV.cfg | cut -d '=' -f2 | tr -d '\r'`
port=`echo | grep 'port=' $path/sickbeard/autoProcessTV/autoProcessTV.cfg | cut -d '=' -f2 | tr -d '\r'`
user=`echo | grep 'username=' $path/sickbeard/autoProcessTV/autoProcessTV.cfg | cut -d '=' -f2 | tr -d '\r'`
pass=`echo | grep 'password=' $path/sickbeard/autoProcessTV/autoProcessTV.cfg | cut -d '=' -f2 | tr -d '\r'`
wget --user=$user --password=$pass http://$host:$port/home/shutdown
sleep 5s
# Get source and untar it.
cd $path
wget http://github.com/midgetspy/Sick-Beard/tarball/$branch
tar zxf midgetspy-Sick-Beard*
rm midgetspy-Sick-Beard*.tar.gz
# Make backup copy of old sickbeard & setup new sickbeard version
cp -R sickbeard sickbeard_backup
mv sickbeard/sickbeard.db midgetspy-Sick-Beard-*/
mv sickbeard/config.ini midgetspy-Sick-Beard-*/
mv sickbeard/autoProcessTV/autoProcessTV.cfg midgetspy-Sick-Beard-*/autoProcessTV/
rm -rf sickbeard
mv midgetspy-Sick-Beard-* sickbeard
# Start sickbeard as daemon
cd sickbeard
nohup python SickBeard.py &