Instalar pyLoad en Disco Nas Synology

En el siguiente articulo voy a describir los pasos para instalar el Gestor de Descargas pyLoad en un Disco Duro Synology. En mi caso, un Disco Synology Ds111, con Cpu ARM.

La información del proceso de instalación y configuración ha sido obtenida de las siguientes paginas :

http://setaoffice.com/2011/04/10/how-to-install-pyload-on-a-synology-diskstation-ds211j/
http://forum.synology.com/enu/viewtopic.php?f=38&t=34051
http://www.synology-wiki.de/index.php/PyLoad
http://nas-tweaks.net/220/installation-of-pyload-on-optware/

El Gestor de Descargas integrado en DiskStation "Download Station" (Ver), permite múltiples formatos de descarga : BitTorrent, FTP, HTTP, eMule, RapidShare, Megaupload, etc.
Bien, el problema es que la descarga de ficheros de sitios como RapidShare o Megaupload, solo es posible a través de cuentas Premium.

Buscando una alternativa, para poder descargar de este tipo de sitios, sin necesidad de cuentas Premium, encontré el software pyLoad; y la información para instalarlo y configurarlo en un Disco Nas Synology.

Como requisito previo, es necesario haber modificado el Servidor Synology, para poder instalar paquetes ipkg; los pasos fueron descritos en un articulo previo (Ver).

Nos conectaremos por Ssh, e instaleramos los paquetes "python, py25-crypto, py25-curl, py25-openssl, py25-pil, tesseract-ocr, tesseract-ocr-lang-eng, ossp-js" con los comandos :

ipkg install python
ipkg install py25-crypto
ipkg install py25-curl
ipkg install py25-openssl
ipkg install py25-pil
ipkg install tesseract-ocr
ipkg install tesseract-ocr-lang-eng
ipkg install ossp-js
ipkg install unrar

A continuación descargaremos los Ficheros Fuente de la ultima versión de pyLoad :

cd /opt
wget http://get.pyload.org/get/src/0.4.6/
unzip pyload-src-v0.4.6.zip
rm pyload-src-v0.4.6.zip
cd pyload/

A continuación cambiaremos el directorio de configuración :

cd module/config/
echo "/volume1/pyload" >> configdir

Daremos permisos de ejecución a pyLoad :

chmod +x /opt/pyload/pyLoadCore.py

Iniciaremos pyLoad :

python /opt/pyload/pyLoadCore.py

Al ser la primera ejecución, se iniciará el asistente de configuración, el cual se entiende bastante bien, aunque aquí os dejo el Asistente en Ingles :

Choose your Language / Wähle deine Sprache ([en], de, it, pl, fr, cs, es): {ENTER}

Welcome to the pyLoad Configuration Assistent.
It will check your system and make a basic setup in order to run pyLoad.

The value in brackets [] always is the default value,
in case you don’t want to change it or you are unsure what to choose, just hit enter.
Don’t forget: You can always rerun this assistent with –setup or -s parameter, when you start pyLoadCore.
If you have any problems with this assistent hit STRG-C,
to abort and don’t let him start with pyLoadCore automatically anymore.

When you are ready for system check, hit enter.
{ENTER}
## System Check ##
Python Version: OK
pycurl: OK
sqlite3: OK

pycrypto: OK
OpenSSL: OK

py-imaging: OK
tesseract: OK

PyQt4: missing

django: OK
JS engine: OK

System check finished, hit enter to see your status report.
{ENTER}
## Status ##

Features available: container decrypting, ssl connection, automatic captcha decryption, Webinterface, extended Click’N'Load

Continue with setup? ([y]/n): {ENTER}

Do you want to change the config path? Current is /opt/pyload/.pyload
If you use pyLoad on a server or the home partition lives on an internal flash it may be a good idea to change it.
Change config path? (y/[n]): {ENTER}

Do you want to configure basic settings?
This is recommend for first run.
Make basic setup? ([y]/n): {ENTER}

## Basic Setup ##

The following logindata are only valid for CLI and GUI, but NOT for webinterface.
Username [User]: MyPersonalUser {ENTER}
Password: MyPasswordForUser {ENTER}
Password (again): MyPasswordForUser {ENTER}

Language ([en], de, it, pl, es, cs, fr): {ENTER}
Downloadfolder [Downloads]: /mnt/HD/HD_a2/Downloads/ {ENTER}
Max parallel downloads [3]: {ENTER}
Use Reconnect? (y/[n]): {ENTER}

Do you want to configure ssl?
Configure ssl? (y/[n]): {ENTER}

Do you want to configure webinterface?
Configure webinterface? ([y]/n): {ENTER}

## Webinterface Setup ##

Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_admin_log
Creating table pyload_prefs
Installing index for auth.Permission model
Installing index for auth.Message model
Installing index for admin.LogEntry model
If you see no errors, your db should be fine and we’re adding an user now.
Username [User]: MyPersonalUserForWebInterface {ENTER}
Superuser created successfully.
Password: MyPasswordforWeb {ENTER}
Password (again): MyPasswordforWeb {ENTER}

Activate webinterface? ([y]/n): {ENTER}

Listen address, if you use 127.0.0.1 or localhost, the webinterface will only accessible locally.
Address [0.0.0.0]: {ENTER}
Port [8000]: {ENTER}

Setup finished successfully.
Hit enter to exit and restart pyLoad
{ENTER}

A continuación, crearemos el script de inicio, para que el Servicio pyLoad se inicia automáticamente al encender el disco.
Para ello, crearemos el script en la carpeta /opt/etc/init.d/ :

nano /opt/etc/init.d/S99pyload.sh

Código del Script :

#!/bin/sh
#
# Start / Stop Script for PyLoad http://localhost:8000
#
prefix="/opt"
PATH=${prefix}/bin:${prefix}/sbin:/sbin:/bin:/usr/sbin:/usr/bin
NAME="PyLoad"
DAEMON="python /opt/pyload/pyLoadCore.py –daemon"
DAEMON_OPTS=""
#
#
start() {
       echo "Starting Service: $NAME"
       $DAEMON $DAEMON_OPTS | awk '{print $3}' >/var/run/pyload.pid
}
#
stop() {
       kill `cat /var/run/pyload.pid`
}
#
case "$1" in
       start)
               start
               ;;
       stop)
               stop
               ;;
       restart)
               stop
               sleep 4
               start
               ;;
       *)
               echo "Usage: $0 (start|stop|restart)"
               exit 1
               ;;
esac
#
# End

Daremos permisos de ejecución al script de inicio :

chmod +x /opt/etc/init.d/S99pyload.sh

Podemos crear un Icono de acceso a la Web de Administración de pyLoad, desde el Panel de DiskStation (DSM)

cd /usr/syno/synoman/webman/3rdparty
wget http://dl.dropbox.com/u/3001640/webman.pyload.tar.gz
tar xvfz webman.pyload.tar
rm webman.pyload.tar

Sino hemos configurado el acceso a la web de pyLoad con el puerto por defecto (8000), deberemos editar el fichero de configuración application.cfg ; y cambiaremos el parámetro port :

nano /usr/syno/synoman/webman/3rdparty/pyload/application.cfg

 

* En el momento de escribir este articulo, acababa de estar disponible la versión 0.4.6, y también en formato ipkg ( http://pyload.org/download )
No he tenido tiempo de probar la instalación (mucho mas simple), pero los comandos de instalación serian los siguientes :

ipkg install tesseract-ocr tesseract-ocr-lang-eng ossp-js unrar
wget http://get.pyload.org/static/pyload-v0.4.6-noarch.ipk
ipkg install pyload-v0.4.6-noarch.ipk
pyLoadCore -s

El ultimo comando es el de configuración.

Sobre rickcpp

Ciudadano de Burgos, aficionado a la Informática.