Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Released under the GNU General Public License version 3 by J2897.
- # Simple script for controlling VLC via JuiceSSH.
- clear
- PW="temp"
- PS3='Please enter your choice: '
- options=("Sky News." "Techno4Ever." "Playlist." "End VLC." "Kill all VLC." "Quit.")
- select opt in "${options[@]}"
- do
- case $opt in
- "Sky News.")
- echo "Launching Sky News..."
- nohup cvlc --intf dummy --extraintf http mms://live2.wm.skynews.servecast.net/skynews_wmlz_audio --http-password "$PW" & echo $! > vlc.pid
- sleep 1s
- ;;
- "Techno4Ever.")
- echo "Launching Techno4Ever..."
- nohup cvlc --intf dummy --extraintf http http://yp.shoutcast.com/sbin/tunein-station.pls?id=373505 --http-password "$PW" & echo $! > vlc.pid
- sleep 1s
- ;;
- "Playlist.")
- echo "Launching a Playlist..."
- nohup cvlc --intf dummy --extraintf http "/home/j2897/VLC/sleep_music.xspf" --http-password "$PW" --loop & echo $! > vlc.pid
- sleep 1s
- ;;
- "End VLC.")
- echo "Ending VLC..."
- kill `cat vlc.pid`
- break
- ;;
- "Kill all VLC.")
- echo "Killing all VLC instances..."
- pidof vlc | xargs kill -9
- break
- ;;
- "Quit.")
- break
- ;;
- *) echo invalid option;;
- esac
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement