PadreDeFamilia

QVIART DUAL : SATELITE 4K ANDROID 9.0 DVB-S2X+DVB-T2+DVB-C+IPTV

Chincheta Autor Tema: Oscam en Qnap  (Leído 3441 veces)

02/01/2015, 15:59 -

Oscam en Qnap

Registrado:
21/03/2012
Gracias:
2/0
Mensajes
58
hola! alguien ha instalado el oscam en un qnap? yo he podido hacerlo funcionar pero si se reinicia el equipo se tiene que encender a mano.

Alguien a probado?

Un saludo.
06/01/2015, 12:26 -

Re: Oscam en Qnap

#1
Registrado:
01/12/2014
Gracias:
18/24
Mensajes
279
Puedes seguir estas instrucciones que he encontrado en la wiki de qnap:


Código: [Seleccionar]
Manual edit of autorun.sh

Log into your QNAP device using SSH or Telnet, for instance by using Putty
Optional: install nano; use ipkg install nano & edit with nano instead of vi
TS-201: Mount the config ramblock /dev/mtdblock4:
# mount -t ext2 /dev/mtdblock4 /tmp/config
TS-109, TS-109P, TS-110, TS-119, TS-209, TS-209P, TS-219 (TS-219P II: since the new firmware update you maybe have to use ext4 instead of ext2), TS-409 (Marvell ARM), TS-412, TS-419P: Mount the config ramblock /dev/mtdblock5::
# mount -t ext2 /dev/mtdblock5 /tmp/config
TS-439, TS-509, TS-639, TS-809, TS-809U (x86): Mount the config ramblock /dev/sdx6:
# mount -t ext2 /dev/sdx6 /tmp/config
TS-269L: Mount the config ramblock /dev/sdc6:
# mount -t ext2 /dev/sdc6 /tmp/config
Create/Edit /tmp/config/autorun.sh .
either using vi:
# vi /tmp/config/autorun.sh
Get vi editor into edit mode: press a
Edit whatever you need to
Exit edit mode: press ESC
Save and exit: press ZZ
or editing it using a desktop PC and e.g. SFTP
Ensure that /tmp/config/autorun.sh is executable:
# chmod +x /tmp/config/autorun.sh
IMPORTANT: Unmount the mounted flash partition:
# umount /tmp/config
editautorun.sh: script to ease autorun.sh edit

If you edit this file regularly you can save some time by creating a shell script (e.g. editautorun.sh) to automate the process. You can call the script by either putting it in the environment path, or add its folder to the path or call it by an alias.
The script contents are:
For TS-201 use ...
mount -t ext2 /dev/mtdblock4 /tmp/config
vi /tmp/config/autorun.sh
chmod +x /tmp/config/autorun.sh
echo .
echo "unmounting /tmp/config..."
umount /tmp/config
For TS-109, TS-109P, TS-119, TS-209, TS-209P, TS-219, TS-412, TS-409 (Marvell ARM) use ...
mount -t ext2 /dev/mtdblock5 /tmp/config
vi /tmp/config/autorun.sh
chmod +x /tmp/config/autorun.sh
echo .
echo "unmounting /tmp/config..."
umount /tmp/config
TS-439, TS-509, TS-639, TS-809, TS-809U (x86) use ...
mount -t ext2 /dev/sdx6 /tmp/config
vi /tmp/config/autorun.sh
chmod +x /tmp/config/autorun.sh
echo .
echo "unmounting /tmp/config..."
umount /tmp/config
autorun.sh  :o  ne script to rule them all

Frequently mounting and editing autorun.sh on the flash could be an annoying task. More important, it may reduce the lifetime of some flash blocks. Flash blocks have limited write/erase cycles, and the mtdblock device driver does little to prevent their wear. Read more on this on the Linux mtd web site.
To avoid this, you could configure autorun.sh to launch another script located in the inner drive: in this way there no need to always mount and modify the file inside the flash. but only edit the script file located on your drive.
Create the directory /share/HDA_DATA/.qpkg/autorun and file autorun.sh with:
mkdir /share/HDA_DATA/.qpkg/autorun
cd /share/HDA_DATA/.qpkg/autorun/
touch autorun.sh
chmod +x autorun.sh
The autorun.sh located on the flash could be something like this (just two lines that won't need many changes!):
#!/bin/sh
/share/HDA_DATA/.qpkg/autorun/autorun.sh &
and then edit the file /share/HDA_DATA/.qpkg/autorun/autorun.sh to be used to launch all your startup scripts.

IMPORTANT Notes!

1. Never put any larger files on your flashboot devices and ramdisk; instead, create symbolic links to whatever you want to put there, e.g.:
Create a link from /usr (which is in ramdisk) to /share/MD0_DATA/jre1.6.0_10 (which is on a hard disk) at the mountpoint /usr/java
# ln -sf /share/MD0_DATA/jre1.6.0_10 /usr/java

2. Always use the full system path because locations like /opt/bin or /opt/sbin might not have been exported yet when Autorun.sh is executed, e.g:

No good.
svnserve -d --listen-port=4000 -r /share/subversion

This is better.
/opt/bin/svnserve -d --listen-port=4000 -r /share/subversion


If it still fails to start svnserve, you might try adding this line to your autoexec script:
/bin/ln -sf /opt/bin/ /share/HDA_DATA/opt/bin/

3. Many startup scripts in /etc/init.d overwrite their corresponding configuration files in /etc. In this case overwriting the config file using autorun.sh is not enough; we also have to overwrite the startup script itself. Moreover, many startup scripts get excecuted before autorun, such that we also have to restart the service. In this case an autorun.sh may look like this:
#!/bin/sh

cp /share/MD0_DATA/admin/nfs /etc/init.d/nfs
cp /share/MD0_DATA/admin/exports /etc

/etc/init.d/nfs restart
Very ugly, indeed! However, it seems this is the only way to make it work (unless you want to throw out the QNAP OS and install a 'better' OS on your NAS).
4. On our QNAP TS-879 Pro we were not able to run
/opt/bin/rsyncd-acl.sh start
from the autorun.sh as /opt is not the one from Optware but a directory containing one file, i.e. nasconfig_fs.img.tgz.
Thus we modified /tmp/config/autorun.sh to
#!/bin/sh
log=/share/MD0_DATA/.qpkg/Optware/var/log/autorun
date > $log
# removing bogus /opt
/bin/rm /opt/nasconfig_fs.img.tgz /opt 2>> $log >> $log
/bin/rmdir /opt 2>> $log >> $log
# link correct /opt
/bin/ln -s /share/MD0_DATA/.qpkg/Optware /opt 2>> $log >> $log
# run autorun.sh
/opt/etc/autorun.sh 2>> $log >> $log
created a log file directory
mkdir -p /opt/var/log
and created /opt/etc/autorun.sh on the disk
#!/bin/sh
/opt/bin/rsyncd-acl.sh start
thus no mounting of the flash partition is necessary anymore.
QPKG-based method

With firmware 3.8.2, the #MTD-based_method was broken. With the next firmware update, this bug was corrected, but in the meanwhile, the below workaround has been devised.
This method consists of declaring a dummy QPKG which launches your script at startup.
Log into your QNAP device using SSH or Telnet, for instance by using Putty
Edit QPKG config file:
# vi /etc/config/qpkg.conf
Declare a new dummy package by adding something like that in this file, but take care about the order. e.g. if you would like to start a service from a optware package, be sure optware is initialized before:
[autorun]
Name = autorun
Version = 0.1
Author = neomilium
Date = 2013-05-06
Shell = /share/MD0_DATA/.qpkg/autorun/autorun.sh
Install_Path = /share/MD0_DATA/.qpkg/autorun
Enable = TRUE
As you can see, Shell is the interesting variable: at boot-time, QNAP OS will launch each QPKG's Shell variable content.
Note: if your NAS doesn't have /share/MD0_DATA (i.e. is a one-drive NAS), put the right directory into the Shell and Install_Path variables and adapt the following commands to your needs.
Create the dummy package directory:
# mkdir /share/MD0_DATA/.qpkg/autorun
Create the autorun script with the contents of your choice:
# vi /share/MD0_DATA/.qpkg/autorun/autorun.sh
Note: don't forget "#!/bin/sh" at the beginning of script.
Set the execute bit:
# chmod +x /share/MD0_DATA/.qpkg/autorun/autorun.sh
Reboot and enjoy!

Espero que te sirva y comenta tus avances por aquí.
14/01/2015, 12:38 -

Re: Oscam en Qnap

#2
Registrado:
21/03/2012
Gracias:
2/0
Mensajes
58
Encender el oscam, en eso bien, pero a la hora de hcaer que se inicie automáticamente... no me sale no. he probado esto que me pasas pero sigo igual, he creado el scrip pero no se si lo habré creado bien. sabes como podría probar si el scrip funciona?

Gracias.
14/01/2015, 13:07 -

Re: Oscam en Qnap

#3
Registrado:
01/12/2014
Gracias:
18/24
Mensajes
279
Encender el oscam, en eso bien, pero a la hora de hcaer que se inicie automáticamente... no me sale no. he probado esto que me pasas pero sigo igual, he creado el scrip pero no se si lo habré creado bien. sabes como podría probar si el scrip funciona?

Gracias.

No tengo experiencia con qnap, pero para probar si el script arranca OSCAM, puedes ejecutarlo directamente, con el OSCAM parado, a ver si lo arranca.


Si quieres postea el script a ver si podemos echarle un vistazo.
16/01/2015, 14:25 -

Re: Oscam en Qnap

#4
Registrado:
21/03/2012
Gracias:
2/0
Mensajes
58
Hola!

El scrip que pongo es:

#!/bin/sh
/usr/oscam/oscam -c /usr/oscam/ -b

(ahora he creado esa carpeta en usr y ahí lo tengo, entonces para ejecutarlo pongo esto)

Por hoy creo que ya estoy saturado, porque no se si pongo donde toca el scrip, me he liado ha hacer lo que dice la wiki de qnap, añadiendo archivos, poniéndolos en 755 claro, para que funcione y añadiéndolo todo al qpkg.conf pero nada, algo hago mal, por lo menos lo puedo ejecutar a mano, pero si un dia se va la luz, o se reinicia el nas, hay que hacerlo, no es cómodo.

Un salduo,
16/01/2015, 18:27 -

Re: Oscam en Qnap

#5
Registrado:
01/12/2014
Gracias:
18/24
Mensajes
279
Pues no se que decirte Sicko. Por lo que dices el script, ejecutado a mano, arranca oscam, entonces el problema puede que esté en el qpkg.conf, quizas puedas postear tambien ese archivo, para echarle un vistazo. Siento no poder ayudarte mas.

Quizas si me dieses acceso a la NAS por ssh te podría ayudar mas   :P  Es broma...  ;)

QVIART DUAL : SATELITE 4K ANDROID 9.0 DVB-S2X+DVB-T2+DVB-C+IPTV

 



PadreDeFamilia
!! ADVERTENCIAS !!: Las informaciones aquí publicadas NO CONTIENEN KEYS para la decodificación de ningún sistema: NO SON OPERATIVOS en sistemas SAT que precisen de su correspondiente suscripción. ESTA TOTALMENTE PROHIBIDO EL USO DE ESTAS INFORMACIONES PARA LA MODIFICACIÓN O DEFRAUDACIÓN DE SISTEMAS DE ACCESO CONDICIONAL. EN ESTOS FOROS NO SE PERMITE LA PUBLICACIÓN DE INFORMACIONES ILEGALES POR PARTE DE LOS USUARIOS. EN CASO DE DETECTARSE ESTE TIPO DE INFORMACIONES, LOS USUARIOS SERÁN EXCLUIDOS DE ESTAS PÁGINAS.
PROHIBIDA LA PUBLICACIÓN DE ENLACES A FIRMWARES ILEGALES
LOS FOROS NO SON MONITORIZADOS DE MANERA CONSTANTE, CUALQUIER INFORMACIÓN QUE PUEDAS CONSIDERAR ILEGAL REPORTALA A LA ADMINISTACIÓN DEL FORO