Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...)
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
[SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...)
20th Oct, 2014, 12:46 AM
Post: #12
josch Offline
Registered
Posts: 85
Joined: Jan 2014
Reputation: 17
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...)
(19th Oct, 2014 09:19 PM)med Wrote:  
Terminal
xbian@xbian ~/Downloads $ ./xbian_installPyLoad.sh
./xbian_installPyLoad.sh: line 1: !DOCTYPE: No such file or directory
./xbian_installPyLoad.sh: line 2: syntax error near unexpected token `newline'
./xbian_installPyLoad.sh: line 2: ` "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'

This isn't my script, it doesn't contain such things. Seems that you didn't download the script correctly.
Please check the content of your xbian_installPyLoad.sh file. It should contain the following code:

Code:
#!/bin/bash
set -e

if [ "$UID" -ne 0 ]
then
  echo -e "\033[01;37;44m Error: This script must be run as root. (sudo) \033[0m"
  exit
fi

if [ ! -f /usr/local/include/xbian-config/config/services ]
then
  echo -e "\033[01;37;44m Error: Can't find xbian-config services file. You should run this script only on XBian OS! \033[0m"
  exit
fi

userexists=false
getent passwd xbian >/dev/null 2>&1 && userexists=true
if ! $userexists
then
  echo -e "\033[01;37;44m Error: There is no user 'xbian'. \033[0m"
  exit
fi

echo -e "\033[01;37;44m This script will download and install pyLoad v0.4.9 (tested on XBian 1.0RC2+RC3) \033[0m"
echo ""
echo -e "\033[01;37;44m Following additional features will be available: \033[0m"
echo -e "\033[37;44m - super fast lightweight webserver 'bjoern'  \033[0m"
echo -e "\033[37;44m - working with Click'n'Load \033[0m"
echo -e "\033[37;44m - captcha recognition  \033[0m"
echo -e "\033[37;44m - automatic unrar archives \033[0m"
echo ""
echo -e "\033[01;37;44m Do you want to continue? [y/n] \033[0m"
read -n1 answer
answer=${answer:-n}
echo ""
if [ $answer != y ]
then
  exit
fi

echo -e "\033[37;44m Installing dependencies ... \033[0m"
apt-get install python-support python-pycurl python-crypto python2.7-dev libev-dev python-pip gcc spidermonkey-bin libnspr4 tesseract-ocr python-imaging unrar

echo -e "\033[37;44m Installing lightweight webserver 'bjoern' ... \033[0m"
pip install bjoern

echo -e "\033[37;44m Downloading pyload-cli-v0.4.9-all.deb ... \033[0m"
cd /tmp
wget http://download.pyload.org/pyload-cli-v0.4.9-all.deb

echo -e "\033[37;44m Installing pyLoad ... \033[0m"
dpkg -i pyload-cli-v0.4.9-all.deb

echo -e "\033[37;44m Calling pyLoad configuration as user 'xbian' ... \033[0m"
echo ""
echo -e "\033[01;37;44m - DON'T CHANGE YOUR CONFIG PATH!!!! (/home/xbian/.pyload) \033[0m"
echo -e "\033[01;37;44m - DISABLE REMOTE ACCESS IF YOU DON'T USE IT \033[0m"
echo -e "\033[01;37;44m - SET THE WEBINTERFACE LISTEN ADDRESS TO YOUR RASPBERRY'S IP \033[0m"
echo -e "\033[01;37;44m - DON'T FORGET TO SET 'lightweight' AS YOUR WEBSERVER!! \033[0m"
echo ""
su - xbian -c "/usr/share/pyload/pyLoadCore.py -s"

echo -e "\033[37;44m Fixing pyLoad source to work with all Click'n'Load buttons ... \033[0m"
sed -i "s@or request.environ.get('HTTP_HOST','0') == '127.0.0.1:9666':@or request.environ.get('HTTP_HOST','0') in ('127.0.0.1:9666', 'localhost:9666'):@" /usr/share/pyload/module/web/cnl_app.py

echo -e "\033[37;44m Modifying pyLoad start script to work as expected ... \033[0m"
sed -i 's@~/.pyload/pyload.pid@/home/xbian/.pyload/pyload.pid@' /etc/init.d/pyload
sed -i 's@$DAEMON --daemon@su - xbian -c "$DAEMON --configdir=/home/xbian/.pyload --daemon"@' /etc/init.d/pyload
sed -i 's@$DAEMON -q@su - xbian -c "$DAEMON -q"@' /etc/init.d/pyload

echo -e "\033[37;44m Adding pyLoad to xbian services ... \033[0m"
sh -c "echo 'pyload:/usr/bin/pyLoadCore' >> /usr/local/include/xbian-config/config/services"

echo ""
echo ""
echo -e "\033[01;37;44m Do you want to clean up some packages that were needed during installation? [y/n] \033[0m"
echo -e "\033[37;44m (You will be asked for each package and will see the changes before commiting.) \033[0m"
read -n1 answer
answer=${answer:-n}
echo ""
if [ $answer != y ]
then
  echo -e "\033[01;37;44m Finished. You can now start/autostart the service 'pyload' via xbian-config. \033[0m"
  exit
fi

echo ""
echo -e "\033[01;37;44m Do you want to remove 'python2.7-dev', 'python-pip', 'gcc' and all of their dependencies at once? [y/n] \033[0m"
echo -e "\033[37;44m (Choose no if you like to be asked separately for each package.) \033[0m"
read -n1 answer
answer=${answer:-n}
echo ""
if [ $answer = y ]
then
  apt-get purge --auto-remove python2.7-dev python-pip python2.6-minimal gcc-4.6-base libmpfr4
else
    echo ""
    echo -e "\033[37;44m Remove 'python2.7-dev' and it's dependencies? [y/n] \033[0m"
    read -n1 answer
    answer=${answer:-n}
    echo ""
    if [ $answer = y ]
    then
      apt-get purge --auto-remove python2.7-dev
    fi

    echo ""
    echo -e "\033[37;44m Remove 'python-pip' and it's dependencies? [y/n] \033[0m"
    read -n1 answer
    answer=${answer:-n}
    echo ""
    if [ $answer = y ]
    then
      apt-get purge --auto-remove python-pip python2.6-minimal
    fi

    echo ""
    echo -e "\033[37;44m Remove 'gcc' and it's dependencies? [y/n] \033[0m"
    read -n1 answer
    answer=${answer:-n}
    echo ""
    if [ $answer = y ]
    then
      apt-get purge --auto-remove gcc-4.6-base libmpfr4
    fi
fi

echo ""
echo -e "\033[01;37;44m Finished. You can now start/autostart the service 'pyload' via xbian-config. \033[0m"

You can either put this code into your file manually or download the zip file from my first post again and put it on your RPi. Then do:

Terminal
unzip xbian_installPyLoad.zip
chmod +x xbian_installPyLoad.sh
sudo ./xbian_installPyLoad.sh

IMPORTANT: DON'T USE JUST WGET TO DOWNLOAD THE FILE AS YOU WILL GET AN HTML FILE. DOWNLOAD IT ON PC AND COPY TO YOUR RPi.


Good luck! Wink

My setup:
Software: XBian version: 1.0RC3 | XBMC version: 13.2 (Gotham) | Overclock settings: High
Hardware: RPi model: B | Power: DUB-H7 | SD: Tanscend Class 10 | Network: Wireless
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Messages In This Thread
[SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - josch - 21st Jan, 2014, 09:07 PM
R: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - tribal124 - 6th Feb, 2014, 10:25 AM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - josch - 6th Feb, 2014, 09:50 PM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - tribal124 - 7th Feb, 2014, 12:30 AM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - josch - 7th Feb, 2014, 01:20 AM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - Neutrino1986 - 6th May, 2014, 06:37 PM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - pix3l - 9th May, 2014, 08:01 PM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - Neutrino1986 - 14th May, 2014, 08:45 AM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - josch - 8th Jun, 2014, 01:14 AM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - josch - 26th Sep, 2014, 04:47 PM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - med - 19th Oct, 2014, 09:19 PM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - josch - 20th Oct, 2014 12:46 AM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - med - 21st Oct, 2014, 01:14 AM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - josch - 22nd Oct, 2014, 03:50 AM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - Neutrino1986 - 4th Dec, 2014, 09:48 PM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - Peiote - 18th May, 2016, 04:23 AM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - Nachteule - 18th May, 2016, 06:17 AM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - Peiote - 18th May, 2016, 06:22 AM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - Nachteule - 18th May, 2016, 06:48 AM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - Peiote - 18th May, 2016, 07:01 AM
RE: [SCRIPT] pyLoad Download Manager (with lightweight webserver, Click'n'Load, ...) - Nachteule - 18th May, 2016, 07:37 AM

Possibly Related Threads...
Thread: Author Replies Views: Last Post
Rainbow [SCRIPT] DownloadDaemon (lightweight download server) josch 10 34,856 13th Jul, 2015 03:15 AM
Last Post: omerp

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 5th Jun, 2025, 06:47 PM Powered By MyBB, © 2002-2025 MyBB Group.