IPTV KHnet dvbtwatchdog2
Z KHnetWiki
DVBT restream watchdog
ukázka, funkční, ale zde pravděpodobně neudržovaná.
#!/bin/bash . /usr/local/mediaserver/vlcfunc.sh for port in ${TRANSCODE[@]}; do DPORT=$(($port-1000)) /usr/bin/nc -z 127.0.0.1 ${DPORT} if [ $? = 0 ]; then echo "OK (${DPORT})" else echo "KO (${DPORT})" /usr/local/mediaserver/dvbt-transcode.run ${port} logger -t vlc "Restarted transcode stream, port ${port}" fi done
vlcfunc.sh
#!/bin/bash TRANSCODE=(8011 8012 8013 8014 8021 8022 8023 8024 8025 8031) get_vlc_pid(){ VLC_PID=`ps -U vlc l --cols 255 | grep "$1" | awk '{printf "%d",$3}'` }