View Single Post
Old 08-02-2009   #3
td03-5
.
 
Join Date: 21-12-2004
Location: .
Posts: 202
Thanks: 1
Thanked 14 Times in 9 Posts

My System: .

Hi Llew,

I was hoping that if I left it as it was then when copied back into a Linux text editor the original formatting would be restored!!
Oh! Foolish me! Of course it isn't!
You are almost there, it should look like this when loaded into the Linux text editor:-
#!/bin/bash
# Script file: vlcplsed - written by TD03-5 V1.0 04/02/2009
# Purpose: To change local IP to Internet DynDNS of Dreambox in sent audio.pls file
# for remote audio streaming with Eee PC running Xandros Linux (may be OK for other Linux).
# Usage:
# Open this file with a text editor and:-
# Change: 192.168.0.24 to your Dreambox local IP.
# Change: dreamdns.homelinux.net to your Dreambox DynDNS or Static Internet IP.
# After editing, copy the file to /usr/bin folder and change attributes (chmod) to 755
# Log-on to Dreambox remotely via internet, select a station and click the audio PID.
# When 'Open With' appears select 'Other' & navigate to /usr/bin/vlcplsed and select it.
# This script will run to change the playlist file and then call VLC to open the playlist.
# Presto........remote audio streaming without editing the audio.pls file!

sed '/192.168.0.24/s//dreamdns.homelinux.net/' $1 > /tmp/dnsdb.tmp

rm $1

cp /tmp/dnsdb.tmp $1

exec /usr/bin/vlc $1
rm $1
rm /tmp/dnsdb.tmp

exit o
__________________________________________________ _______________

The line that begins: sed '192.168.......etc is a long line and has wrapped in the forum view. The last part of this line is:
$1 > /tmp/dnsdb.tmp
I've also done the sensible thing this time and added it as an attached file so you can download it.

Good luck.

Best wishes, John.
Attached Files
File Type: zip vlcplsed.zip (648 Bytes, 11 views)

Last edited by td03-5; 08-02-2009 at 10:34 PM. Reason: Clarification
td03-5 is offline   Reply With Quote