Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- StreamLink Twitch.tv Shell Script
- ---------------------------------------------------------------------
- #!/bin/bash
- #Set Variables Up
- EXIT_STATUS=($?)
- echo EXIT_STATUS
- echo $?
- #$2 = 360p
- #Open a livesteam
- echo "Command Received, Attempting to Open Stream"
- while [ $EXIT_STATUS==0 ]
- do
- #streamlink twitch.tv/$1 $2
- echo "Please wait...."
- streamlink twitch.tv/$1 $2 -np "omxplayer -o hdmi"
- EXIT_STATUS=($?)
- #Report On Script Success
- if [ $EXIT_STATUS==0 ]
- then
- echo $1" Is Live, Opening stream now!"
- else
- echo "Unable to access twitch.tv/" $1
- fi
- done
- if [ $EXIT_STATUS==0 ]
- then
- echo "Stream Done, Closing Player"
- else
- echo "The script failed, please check if you have internet, if the stream is on
- fi
Add Comment
Please, Sign In to add comment