gpt4 book ai didi

linux - 在树莓派上,当没有输入流时,我的脚本在循环一段时间后中断

转载 作者:太空宇宙 更新时间:2023-11-04 05:08:11 25 4
gpt4 key购买 nike

在树莓派上,当没有输入流时,我的脚本在循环一段时间后中断

enter image description here #!/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

最佳答案

尝试使用以下命令启动脚本:

bash -x script_name.sh

并在输出中查找错误。

关于linux - 在树莓派上,当没有输入流时,我的脚本在循环一段时间后中断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58559917/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com