qstream-poll-list 440 Bytes
Newer Older
oak's avatar
oak committed
1 2 3 4 5 6
#!/bin/sh

dest=$1
tmp=/tmp/poll.cf.new$$

curl -s http://forskningsnett.uninett.no/tv/playlist.html \
Olav Kvittem's avatar
Olav Kvittem committed
7
| perl -ne 'if(/^#EXTINF:.*,(.*)/){$n=$1; $n=~s/\W/_/g} elsif (/^\w/){chomp;if(/239.1.1/){$op="Snap"} elsif (/233.155.107/){$op="TV2"} else{$op="Div"};printf "%s_%s;%s;-mpeg\n", $op, $n, $_}' | grep -v -f /local/net-status/iptv/nopoll.cf > $tmp
oak's avatar
oak committed
8 9

if  test -s $tmp; then
Olav Kvittem's avatar
Olav Kvittem committed
10
#    ci -q -l -mauto /etc/qstream/iptv/poll.cf
oak's avatar
oak committed
11 12
    mv $tmp $dest
fi