Last active
March 21, 2022 01:45
-
-
Save erenseymen/0136a2c92c08a01ca923aea94a28d367 to your computer and use it in GitHub Desktop.
fg-radio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FG_STREAM_URL="http://37.1.145.21:9001/;stream.mp3" | |
FG_COMMAND="audacious -2 --headless $FG_STREAM_URL" | |
FG_COMMAND_PID=$(pgrep -f "$FG_COMMAND") | |
if [ $FG_COMMAND_PID ] | |
then | |
kill -9 $FG_COMMAND_PID | |
else | |
$FG_COMMAND & | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment