You want to turn your little home-server into a download agent you can control through a web-interface or a jabber account on your mobile phone? Then follow these few steps to get this done quickly.
What is pyLoad? Let’s read the introduction from the developers’ website:
pyLoad is a fast, lightweight and full featured download manager for many One-Click-Hoster, container formats like DLC, video sites or just plain http/ftp links. It aims for low hardware requirements and platform independence to be runnable on all kind of systems (desktop pc, netbook, NAS, router).
Despite its strict restriction it is packed full of features just like webinterface, captcha recognition, unrar and much more. http://pyload.org
Read Update 10.08.2011 to get the current version.
Obsolete guide:
There already is an installation-package for debian, but it contains the dependencies of the GUI, but as you guess we don’t need a GUI on a box without display. So you can modify the deb-package like that:
wget http://get.pyload.org/get/build/debian/pyload-v0.4.6-all.deb
mkdir /tmp/deb
dpkg-deb -x pyload-v0.4.6-all.deb /tmp/deb/
dpkg-deb --control pyload-v0.4.6-all.deb /tmp/deb/
vim /tmp/deb/control
Depends: Depends: python (>= 2.5), python-pycurl, python-crypto, python-imaging, tesseract-ocr, tesseract-ocr-eng #deleted: python-qt4 (>= 4.3)
mkdir /tmp/deb/DEBIAN
mv /tmp/deb/control /tmp/deb/DEBIAN/control
dpkg -b /tmp/deb pyload-v0.4.6-all-mod.deb
Well, I’ve done this, why wouldn’t I share my deb-file with you? There you go:
wget http://dev.shyd.de/dockstar/pyload-v0.4.6-all-mod.deb # get the file
dpkg -i pyload-v0.4.6-all-mod.deb # and install it
apt-get -f install # install dependencies
dpkg-reconfigure pyload # reconfigure pyload for the deps
Now you are ready for the first start, you will be asked a couple of questions:
python /usr/share/pyload/pyLoadCore.py
If everything went well you should be able to login to the web interface, if you chose the default port try dockstar:8000 Once you are logged in go to the settings menu, you may want to turn off the checksums due to the limited CPU of the dockstar.
I have found an init-script to run pyload as service, unfortunately it conflicts with apt-get
when upgrading. So I added this line to /etc/rc.local
to start pyload on startup:
vim /etc/rc.local
su -c 'screen -dmS pyload python /usr/share/pyload/pyLoadCore.py'
This will create a screen named pyload
for the user root, I do this as su -c
because I want to store the configuration-files in /root/.pyload/
.
If you want to take a look at the console-output of pyload just attach the screen with:
screen -r pyload
And simply detach it by pressing CTRL+A D.
Update 13.02.2011:
After some research I finally found a method to start/stop/restart pyLoad with the following script. Remember to comment or delete the line from above in /etc/rc.local
.
Create the file /etc/init.d/pyload
(modify the USER variable with the user that you have created the config and make it executable)
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: pyload
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start or stop pyload.
### END INIT INFO
NAME=pyload
DAEMON=/usr/bin/pyLoadCore
USER=root
STOP_TIMEOUT=3
PIDFILE=/var/run/$NAME.pid
export PATH="${PATH:+$PATH:}/sbin"
[ -x $DAEMON ] || exit 0
[ -e /etc/default/$NAME ] && . /etc/default/$NAME
. /lib/lsb/init-functions
start_daemon () {
start-stop-daemon --start --pidfile $PIDFILE --chuid $USER --exec $DAEMON -- $OPTIONS | cut -d" " -f 3 > $PIDFILE
}
stop_daemon () {
start-stop-daemon --stop --retry="TERM/30/KILL/5" --pidfile "$PIDFILE" --user "$USER" --chuid "$USER"
}
case "$1" in
start)
log_daemon_msg "Starting pyLoadCore" "$NAME"
start_daemon
log_end_msg 0
;;
stop)
log_daemon_msg "Stopping pyLoadCore" "$NAME"
stop_daemon
log_end_msg 0
;;
restart)
log_daemon_msg "Restarting pyLoadCore" "$NAME"
stop_daemon
start_daemon
log_end_msg 0
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
exit 2
;;
esac
exit 0
Create the file /etc/default/pyload
# defaults for pyload
# sourced by /etc/init.d/pyload
OPTIONS="--daemon"
And finally execute
insserv pyload
to add the service.
Update 17.03.2011: v0.4.5
There is a new version available, I created the pyload-v0.4.5-noarch-mod.deb
so you can easily update your installation!
Update 22.04.2011: Update tip.tar.gz
When I started using pyLoad, I subscribed the feed from bitbucket to get updates. Once they make an update, there is a tarball with these changes. I wrote a little script to update the pyLoad installation to the most recent tip.
You have to edit the path of your pyLoad installation, then run it:
wget http://dev.shyd.de/dockstar/update-pyload-tip.sh
chmod +x update-pyload-tip.sh
./update-pyload-tip.sh
Update 15.06.2011: v0.4.6
Today a new version has been released, so I updated my modded files. You can now download pyload-v0.4.6-all-mod.deb
and update your installation:
wget http://dev.shyd.de/dockstar/pyload-v0.4.6-all-mod.deb
dpkg -i pyload-v0.4.6-all-mod.deb
Update 10.08.2011: v0.4.7
Some of you might have seen there is a cli-deb available since v0.4.6. This one exactly equals my modded deb files. I decided not to update my files in future as long the cli version is downloadable at pyload.org. In order to update you need to remove my version (config won’t be touched) and install the cli version, because they are conflicting:
dpkg -r pyload #only do this if you get errors during update
wget http://get.pyload.org/get/ubuntu-cli/pyload-cli-v0.4.7-all.deb
dpkg -i pyload-cli-v0.4.7-all.deb
If a new version is released I will not update this article unless there are big changes I need to tell you 😉
Future releases:
In future you should be able to update pyload-cli as follows:
wget http://get.pyload.org/get/ubuntu-cli/pyload-cli-v0.4.x-all.deb
dpkg -i pyload-cli-v0.4.x-all.deb
References
- http://www.dermute.de/227-debian-als-download-center-pyload-transmission
http://forum.pyload.org/viewtopic.php?f=7&t=234dead link