Progetto

Generale

Profilo

Wiki » radioyun1.sh

Script sh lato Linux - Andrea Belloni, 03-12-2014 17:16

 
1
#!/bin/sh
2

    
3
uci set radio.@radio[0].ch=$1
4

    
5
PLAY=$2
6

    
7
if [ $PLAY -eq "1" ]
8
then
9
  uci set radio.@radio[0].state="play"
10
  echo "========" >> /root/yyy
11
  killall wget 2> /dev/null
12
  killall meta-curl 2> /dev/null
13
  killall madplay 2> /dev/null
14
  URL=`uci get radio.@radio[0].ch$1`
15
  #echo $URL
16
  /usr/bin/sleep 0.1
17
  wget -q --save-headers --header='Icy-MetaData:1' -O - $URL | /root/meta-curl 2>> /root/yyy | madplay --fade-in - 2> /dev/null &
18
else
19
  uci set radio.@radio[0].state="stop"
20
  killall wget 2> /dev/null
21
  killall meta-curl 2> /dev/null
22
  killall madplay 2> /dev/null
23
fi
24

    
(2-2/6)