在覆盆子上,我的脚本在没有输入流的情况下循环一段时间后中断
#!/bin/sh
clear
echo -n "Box ID: " ; sudo cat /proc/cpuinfo | grep Serial | cut -d ' ' -f 2
sleep 2
ping -c1 -s1 www.google.com
pingStatus=$?
if [ $pingStatus = "0" ]
then
clear
echo -n "Box ID:" ; sudo cat /proc/cpuinfo | grep Serial | cut -d ' ' -f 2
echo "Downloading Channel Link"
RTMP="rtmp://localhost:1935/live/mystream"
omxplayer --no-keys $RTMP
./myscript.sh
else
clear
echo "Internet Status: False"
echo -n "Box ID: " ; sudo cat /proc/cpuinfo | grep Serial | cut -d ' ' -f 2
echo "Internet disconnected. Please check Internet"
sleep 1
echo "Starting Channel Promo"
sleep 1
omxplayer --o hdmi /home/pi/promo.mp4
./myscript.sh
fi