yup, i use it as a localhost server sometimes.
Code:
#!/bin/bash
while true; do
sleep 5
pid=$(pidof vlc)
# test if pid is nul.
if [[ -z "$pid" ]]; then
echo "Starting local cvlc server."
/usr/bin/cvlc http://127.0.0.1:8000
exit 0
else
echo "Local cvlc server is already running."
exit 0
fi
done
and then i use StreamRipper to rip music from internet radios.
Code:
#!/bin/bash
while true; do
sleep 5
pid=$(pidof streamripper)
# test if pid is nul.
if [[ -z "$pid" ]]; then
echo "Starting Streamripper."
/bin/streamripper http://107.185.47.98:8000 -u "FreeAmp/2.x" -d /home/vile/Music -r
exit 0
else
echo "Streamripper is already running."
exit 0
fi
done