User Tools

Site Tools


bash:comment_faire_sa_web_radio

Comment faire sa web radio

juste pour commencer un petit script tres pratique, fait sous LadyBug, il vous faut au prealable installer

voila le script

#!/bin/bash
gksu -k "/usr/local/bin/icecast2.sh "
title="ices_cream icecast ogg jack client Streaming avec ices"
ask_ices="Lancez la radio  ?"
gxmessage -center -title "$title" -button Oui,Non "$ask_ices"
RET=$?
if [ "$RET" = "102" ];then
        exit 0
fi
if [ "$RET" = "101" ];then
        ps -C qjackctl>/dev/null
        PID=$?
        if [ "$PID" == "1" ]; then
                killall -9 jackd
                killall -9 audacious
                /usr/bin/qjackctl &
                sleep 6
        fi
        /usr/bin/ices /etc/ices.xml &
        sleep 2
        /usr/bin/audacious.sh
        exit 0
fi

et le code de icecast2.sh icecast2.sh

2eme script fait pour APODIO

#!/bin/bash
#
# lancement de la radio ecos
#
# icecast2
xterm -e su root -c "/usr/local/bin/icecast2.sh "
title="ices_cream icecast ogg jack client Streaming avec ices"
#
ask_ices="Lancez la radio  ?"
gxmessage -center -title "$title" -button Oui,Non "$ask_ices"
RET=$?
if [ "$RET" = "102" ];then
exit 0
fi
if [ "$RET" = "101" ];then
        # test jackd
ps -C qjackctl>/dev/null
PID=$?
if [ "$PID" == "1" ]; then
killall -9 jackd
killall -9 xmms
/usr/bin/qjackctl &
sleep 6
fi
#lance client ices et xmms
/usr/bin/ices /home/toto/radioecos.xml &
sleep 5
/usr/local/bin/xmms.sh /home/toto/ecos_playlist.m3u &
sleep 2
PID=`ps -C xmms | grep xmms| awk '{ print $1}'`
jack_connect xmms-jack_$PID:out_0 ices_radioecos.ogg:in_1
jack_connect xmms-jack_$PID:out_1 ices_radioecos.ogg:in_2

mozilla-firefox http://127.0.0.1:8000/admin/listmounts.xsl &

gxmessage -center -title "STOP radio ecos ?"-button "sortie ?" "Arrete la radio  en cours ?"

killall -9 ices
killall -9 xmms
killall -9 jackd
exit 0
fi

bash/comment_faire_sa_web_radio.txt · Last modified: 2015/08/30 22:55 by 127.0.0.1