jmeads wrote:you just need to wrap it in a while loop, something like
ugly, but it should do the trick, see man bash for more info
You probably want to don't want it to continually try to connect. Shove a sleep command in there to give it a breather. e.g.
while true; do
However that probably isn't what you want. Re-executing 'xmms http://192.168.0.3:9000/stream.mp3'
ever time it fails to connect will leave you with lots of copies of xmms running. When XMMS fails to connect, it doesn't shut down automatically. Also because XMMS doesn't shutdown when it loses/fails to get a connection, the above would only run the command once; until you manually closed xmms.
It seems from searching the net, it seems the best option is probably to run a stream server on the local machine. This server would relay the other server when it gets a connection and play a local file when it can't get a connection. Try searching for stream relay.
One more thing, if you are turning the server off at night, why would you want to keep the client on?
You may also want to see if you can find a command line player that will exit if it loses/fails to get a connection - mpg321 might be upto the job.