
저는 mplayer를 사용하여 Raspberry Pi로 인터넷 라디오 알람시계를 만들고 있습니다. 작동하는 URL이 주어지면 설정이 작동하지만 깨진 URL이 주어지면 설정이 "성공적으로" 종료됩니다. 즉, 오류 코드 없이 종료됩니다. 나를 깨우려면 이 시계가 필요합니다. 따라서 URL이 작동하지 않으면 오류 코드를 반환하여 bash 스크립트가 다음 코드를 시도할 수 있도록 하고 URL이 작동할 때까지 계속 진행합니다. 이것은 작동하지 않는 URL의 출력입니다."https://fake.com".
pi@raspberrypi:~ $ mplayer https://fake.com || echo "failed"
MPlayer2 2.0-728-g2c378c7-4+b1 (C) 2000-2012 MPlayer Team
Cannot open file '/home/pi/.mplayer/input.conf': No such file or directory
Failed to open /home/pi/.mplayer/input.conf.
Cannot open file '/etc/mplayer/input.conf': No such file or directory
Failed to open /etc/mplayer/input.conf.
Playing https://fake.com.
No stream found to handle url https://fake.com
Exiting... (End of file)
명령 실패를 에코하지 않습니다. 이 문제를 어떻게 해결할 수 있습니까?