Hi,

In Brief

Have you checked file permissions?

Detail

The first example you quote that works is the way iptvstream.sh should be called I think (so that parameters can be passed to the script).

The first thing I'd check are the file permissions on iptvstream.sh (i.e. the output from

ls -l /etc/vdr/iptvstream.sh

) and that they allow the user running vdr to execute the script.

In general I hesitate in modifying the source until I have ruled out other possibilities as I imagine an error of this nature in the source would have been picked up by others sooner (unless it is a very recent change).

In closing

First step check file permissions on the shell script.

Regards,

Ian.

Sent from my mobile phone.



-------- Original message --------
From: Zouhair <infonux@gmail.com>
Date: 2013/12/23 22:43 (GMT+00:00)
To: VDR Mailing List <vdr@linuxtv.org>
Subject: [vdr] vdr-iptv "sh -c" iptvstream.sh issue


Hi,

the external script iptvstream.sh not execute from iptv plugins ?
I get: "ERROR: Script execution failed: /etc/vdr/iptvstream.sh 1 4321"

after looking at the source code "protocolext.c"
------
// Create a new session for a process group
     ERROR_IF_RET(setsid() == -1, "setsid()", _exit(-1));
     if (execl(EXTSHELL, "sh", "-c", *cmd, (char *)NULL) == -1) {
        error("Script execution failed: %s", *cmd);
        _exit(-1);
...

I tried to execute it in the same way:

sh -c /etc/vdr/iptvstream.sh 1 4321
not work. (the shell exit with no execution)

I try with the cote (like):
sh -c "/etc/vdr/iptvstream.sh 1 4321"
or,
sh /etc/vdr/iptvstream.sh 1 4321
and, work fine.

Should add cote or remove "-c" in source code to fix this ?
Or any other solution ?


Using: vdr-iptv-2.0.0 and VDR 2.0.2

Thanks.


_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr