[vdr] vdr-iptv "sh -c" iptvstream.sh issue

Zouhair infonux at gmail.com
Tue Dec 24 13:10:20 CET 2013


Hi,

i don't think is file permission related.

ls -la /etc/vdr/iptvstream.sh
-rwxrwxrwx    1 media    media         3348 Dec 24
12:23 /etc/vdr/iptvstream.sh

vdr is running with same user as script permission.
$ ps aux |grep iptv
  662 media      0:43 /usr/bin/vdr -w 60 -Pepgtableid0 -Piptv
-Pstreamdev-server -Pvnsiserver -Pxineliboutput --local=none --primary
--remote=:37890

The problem is: the plugins execute cmd line without cote :/
VDR log:
ERROR: Script execution failed: /etc/vdr/iptvstream.sh 1 4321
Then, the shell (sh -c) does not take two parameters following..

Additional information from channels.conf:
L'Equipe
21;IPTV:10:S=1|P=0|F=EXT|U=/etc/vdr/iptvstream.sh|A=1:I:0:0:680=@4:0:0:4:0:0:0

url from script:
-------
...
case ${PARAMETER} in
1)
#EXTINF:0,21 - L'Equipe 21
URL="rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=994&flavour=ld"
;;
...
-------

Thanks.

Le mardi 24 décembre 2013
Ian_and_joanna <ian_and_joanna at talktalk.net> a écrit:

> 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 at gmail.com> 
> Date: 2013/12/23  22:43  (GMT+00:00) 
> To: VDR Mailing List <vdr at 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 at linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr




More information about the vdr mailing list