14 lines
320 B
Plaintext
14 lines
320 B
Plaintext
|
#!/usr/bin/env sh
|
||
|
|
||
|
radiodj_socket=/var/run/dwelling-radio/djsock
|
||
|
radiodj_playlist_url=http:/playlist
|
||
|
|
||
|
CURL_FLAGS=--unix-socket $radiodj_socket $radiodj_playlist_url -o /dev/null -s -w "%{response_code}"
|
||
|
|
||
|
read -r song response <<< "$(curl -XGET $CURL_FLAGS)"
|
||
|
|
||
|
if [ "$response" -ne "200" ]; then
|
||
|
exit 1;
|
||
|
fi
|
||
|
|
||
|
echo $song
|