http://slackware.cs.utah.edu/pub/slackware/slackware64-14.1/slackware64/d/python-2.7.5-x86_64-1.txz 9b37a33a41b263c945fddb58949386f0 http://www.slackware.com/~alien/slackbuilds/python-cheetah/pkg64/14.1/python-cheetah-2.4.4-x86_64-1alien.tgz f2e4ab251fe05c3c5e03bb5ed20b3b7a http://slackware.cs.utah.edu/pub/slackware/slackware64-14.1/slackware64/ap/sqlite-3.7.17-x86_64-1.txz 730417ec4d8158c6bb5862417107b9f4 http://slackware.cs.utah.edu/pub/slackware/slackware64-14.1/slackware64/d/git-1.8.4-x86_64-1.txz e24d44ec30e7afc16c5509c4d9446140 --no-check-certificate https://github.com/downloads/W-W/unRAID/sickbeard.png --no-check-certificate https://github.com/downloads/Influencer/UNplugged/device_status.png --no-check-certificate https://github.com/downloads/Influencer/UNplugged/new_config.png --no-check-certificate https://github.com/downloads/Influencer/UNplugged/information.png > /boot/config/plugins/sickbeard/sickbeard.cfg echo "INSTALLURL=\"https://github.com/midgetspy/Sick-Beard\"" >> /boot/config/plugins/sickbeard/sickbeard.cfg echo "BRANCH=\"master\"" >> /boot/config/plugins/sickbeard/sickbeard.cfg fi plgstorage=`cat /boot/config/plugins/sickbeard/sickbeard.cfg | grep PLG_STORAGESIZE` if [[ $plgstorage = "" ]]; then echo "PLG_STORAGESIZE=\"yes\"" >> /boot/config/plugins/sickbeard/sickbeard.cfg fi plgdata=`cat /boot/config/plugins/sickbeard/sickbeard.cfg | grep PLG_DATACHECK` if ! [[ $plgdata = "" ]]; then sed "/$plgdata^/d" /boot/config/plugins/sickbeard/sickbeard.cfg >tmp mv tmp /boot/config/plugins/sickbeard/sickbeard.cfg fi plgforceupdate=`cat /boot/config/plugins/sickbeard/sickbeard.cfg | grep FORCEUPDATE` if [[ $plgforceupdate = "" ]]; then echo "FORCEUPDATE=\"yes\"" >> /boot/config/plugins/sickbeard/sickbeard.cfg fi rm /tmp/checkconfig ]]> /dev/null 2>&1" echo "Starting SickBeard: $CMDLINE" sleep 1 nohup $CMDLINE > /dev/null 2>&1 & else CMDLINE="sudo -u $RUNAS python2.7 $INSTALLDIR/SickBeard.py --daemon --port $PORT --datadir $DATADIR --pidfile /var/run/sickbeard/sickbeard.pid > /dev/null 2>&1" echo "Starting SickBeard: $CMDLINE" sleep 1 nohup $CMDLINE > /dev/null 2>&1 & fi TIMER=0 while [ ! -e /var/run/sickbeard/sickbeard.pid ]; do sleep 1 let TIMER=$TIMER+1 echo -n $TIMER if [ $TIMER -gt 10 ]; then echo -n "sickbeard.pid not created for some reason" break fi done echo "... OK" } sickbeard_stop() { # no-op if not running if [ ! -r /var/run/sickbeard/sickbeard.pid ]; then return fi echo "Stopping SickBeard..." sleep 1 kill $(cat /var/run/sickbeard/sickbeard.pid) sleep 3 if [ -e /var/run/sickbeard/sickbeard.pid ]; then kill -9 $(cat /var/run/sickbeard/sickbeard.pid ) rm /var/run/sickbeard/sickbeard.pid fi echo "... OK" sleep 1 } sickbeard_restart() { sickbeard_stop sleep 1 sickbeard_start } sickbeard_buttonstart() { echo "Enabling Sickbeard" CONFIG="/boot/config/plugins/sickbeard/sickbeard.cfg" if [ -f $CONFIG ]; then sed -i "s/"disable"/"enable/"" $CONFIG sleep 3 echo "Starting Sickbeard" sickbeard_start fi } sickbeard_update() { sickbeard_stop sleep 1 sickbeard_install sleep 1 sickbeard_start } write_config() { echo "# SickBeard configuration:" > /boot/config/plugins/sickbeard/sickbeard.cfg echo "SERVICE=\"$SERVICE\"" >> /boot/config/plugins/sickbeard/sickbeard.cfg echo "INSTALLDIR=\"$INSTALLDIR\"" >> /boot/config/plugins/sickbeard/sickbeard.cfg echo "DATADIR=\"$DATADIR\"" >> /boot/config/plugins/sickbeard/sickbeard.cfg echo "RUNAS=\"$RUNAS\"" >> /boot/config/plugins/sickbeard/sickbeard.cfg echo "PLG_STORAGESIZE=\"$PLG_STORAGESIZE\"" >> /boot/config/plugins/sickbeard/sickbeard.cfg echo "INSTALLURL=\"$INSTALLURL\"" >> /boot/config/plugins/sickbeard/sickbeard.cfg echo "BRANCH=\"$BRANCH\"" >> /boot/config/plugins/sickbeard/sickbeard.cfg echo "PORT=\"$PORT\"" >> /boot/config/plugins/sickbeard/sickbeard.cfg echo "FORCEUPDATE=\"$FORCEUPDATE\"" >> /boot/config/plugins/sickbeard/sickbeard.cfg } sickbeard_change_settings() { PORT="$2" INSTALLDIR="$3" DATADIR="$4" if [ $DATADIR == "" ]; then $DATADIR="$INSTALLDIR" fi if [ $RUNAS != $1 ]; then chown -R $1:users "$INSTALLDIR" "$DATADIR" fi RUNAS="$1" PLG_STORAGESIZE="$5" FORCEUPDATE="$6" INSTALLURL="$7" BRANCH="$8" # create SickBeard user if necessary if [[ $RUNAS != "nobody" && $RUNAS != "root" ]]; then if ( ! grep -q ^$RUNAS /etc/passwd ); then useradd -r -g users -d / -s /bin/false $RUNAS &> /dev/null cp /etc/passwd /etc/shadow /boot/config fi fi } sickbeard_enable() { SERVICE=enable sickbeard_change_settings $1 $2 $3 $4 $5 $6 $7 $8 $9 write_config sickbeard_restart } sickbeard_disable() { sickbeard_stop SERVICE=disable sickbeard_change_settings $1 $2 $3 $4 $5 $6 $7 $8 $9 write_config } sickbeard_install() { echo "Installing latest version of SickBeard..." if [ ! -e "$INSTALLDIR" ]; then mkdir -p $INSTALLDIR fi if [ ! -e "$DATADIR" ]; then mkdir -p $DATADIR fi if [ -e ""$INSTALLDIR"/version.txt" ]; then rm ""$INSTALLDIR"/version.txt" fi cd /tmp git clone -b $BRANCH $INSTALLURL Sick-Beard cp -Rfu /tmp/Sick-Beard/* $INSTALLDIR cd /tmp/Sick-Beard/ git rev-parse HEAD >> "$INSTALLDIR"/version.txt rm -Rf /tmp/Sick-Beard chown -R $RUNAS:users "$INSTALLDIR" "$DATADIR" sleep 3 echo "... OK" sleep 1 } sickbeard_storagesize() { if [ $1 ] && [ $2 ]; then if [ -d $1 ]; then INST=`du -sh $1 | cut -f1` elif [ -f $1 ]; then INST=`ls -lah $1 | awk '{ print $5}'` fi if [ -d $2 ]; then DAT=`du -sh $2 | cut -f1` elif [ -f $2 ]; then DAT=`ls -lah $2 | awk '{ print $5}'` fi if [ $1 == $2 ]; then echo "

Storage memory usage: install + data directory: $INST

" else echo "

Storage memory usage: install directory: $INST, data directory: $DAT

" fi elif [ $1 ]; then if [ -d $1 ]; then INST=`du -sh $1 | cut -f1` elif [ -f $1 ]; then INST=`ls -lah $1 | awk '{ print $5}'` fi echo "

Storage memory usage: $INST

" fi } sickbeard_datacheck() { array=( ramfs proc tempfs sysfs ) fs=$( stat -f -c '%T' $DATADIR ) for i in "${array[@]}" do if [ $i = $fs ]; then echo "

WARNING: Your Data Directory is not persistent and WILL NOT survive a reboot. Please locate Data Directory on disk for persistency

" break elif [ $i = msdos ]; then echo "

WARNING: Your Data Directory is located on your flash drive. This will decrease your flash drives life span!

" break else echo "

Your data will persist after a reboot

" break fi done } sickbeard_updateplg() { cd /boot/config/plugins [ -f sickbeard_unplugged.64bit.plg.old ] && rm -f sickbeard_unplugged.64bit.plg.old if [ -f sickbeard_unplugged.64bit.plg ]; then mv sickbeard_unplugged.64bit.plg sickbeard_unplugged.64bit.plg.old echo "Updating plugin" wget -q --no-check-certificate https://github.com/sacretagent/Unplugged_64Bit_Unraid.6/raw/master/sickbeard_unplugged.64bit.plg /usr/local/sbin/installplg /boot/config/plugins/sickbeard_unplugged.64bit.plg else echo "Updating plugin" wget -q --no-check-certificate https://github.com/sacretagent/Unplugged_64Bit_Unraid.6/raw/master/sickbeard_unplugged.64bit.plg /usr/local/sbin/installplg /boot/config/plugins/sickbeard_unplugged.64bit.plg fi } sickbeard_downgradeplg() { cd /boot/config/plugins if [ -f sickbeard_unplugged.64bit.plg.old ]; then rm -f /sickbeard_unplugged.64bit.plg mv sickbeard_unplugged.64bit.plg.old sickbeard_unplugged.64bit.plg echo "downgrading plugin" /usr/local/sbin/installplg /boot/config/plugins/sickbeard_unplugged.64bit.plg fi } # read our configuration source /boot/config/plugins/sickbeard/sickbeard.cfg case "$1" in 'start') sickbeard_start ;; 'stop') sickbeard_stop ;; 'restart') sickbeard_restart ;; 'enable') sickbeard_enable $2 $3 $4 $5 $6 $7 $8 $9 ;; 'disable') sickbeard_disable $2 $3 $4 $5 $6 $7 $8 $9 ;; 'install') sickbeard_install ;; 'update') sickbeard_update ;; 'storagesize') sickbeard_storagesize $2 $3 ;; 'datacheck') sickbeard_datacheck ;; 'updateplg') sickbeard_updateplg ;; 'downgradeplg') sickbeard_downgradeplg ;; 'buttonstart') sickbeard_buttonstart ;; *) echo "usage $0 start|stop|restart|enable|disable|install|update|storagesize|datacheck|updateplg|downgradeplg" esac ]]>
/boot/config/plugins/sickbeard/sickbeard.png /boot/config/plugins/images/device_status.png /boot/config/plugins/images/new_config.png /boot/config/plugins/images/information.png
Status: RUNNING with version: STOPPED NOT INSTALLED


Installed from branch of site

Plug-in Version:

Update available to version:


Configuration:
Enable SickBeard:
Install directory:
Data directory: onChange="checkDATADIR(this.form);">
Port:
Run as user:
---
Show storage memory usage:
Force Update on Start?


Install from:
Specify branch:

]]>