Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[SOLVED] Automatically starting a webradio stream at start up
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Solved: Automatically starting a webradio stream at start up
8th Sep, 2013, 01:37 AM
Post: #18
pacmyc Offline
Registered
Posts: 13
Joined: Aug 2013
Reputation: 0
RE: Automatically starting a webradio stream at start up
(7th Sep, 2013 12:43 AM)f1vefour Wrote:  This is a hack but I tested it and it works.

First do this:

Terminal

sudo mv /usr/local/lib/xbmc/xbmc.bin /usr/local/lib/xbmc/xbmc

Then copy this linked file to /usr/local/lib/xbmc/ and run this:

http://db.tt/tf3uaUIL

Terminal

sudo chmod +x /usr/local/lib/xbmc/xbmc.bin

The contents of the downloaded file:

Code:
#!/bin/sh
IP="206.190.36.45"
COUNT=10

until [ $COUNT -lt 1 ]; do
    ping -c 1 $IP > /dev/null
    if [ $? -eq 0 ]; then
       echo "network up"
       /usr/local/lib/xbmc/xbmc --standalone
       break
    else
       echo "network down"
    fi
    let COUNT-=1
    sleep 1
done

Note: XBMC will fail to start if the network is totally down. The IP address used is yahoo.com (what we used back when I was an ISP tech).

To undo do this:
Terminal

sudo rm /usr/local/lib/xbmc/xbmc.bin
sudo mv /usr/local/lib/xbmc/xbmc /usr/local/lib/xbmc/xbmc.bin

Hi. Thanx, that might work but it feels a little bit dangerous. Also,
I'd like to be able to boot XBMC even if the internet connection is down.

What about putting only "sleep 60" for example in the file instead of the loop and the ping command? That would give the router and the modem 1 more minute to connect than before, right?
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Messages In This Thread
Automatically starting a webradio stream at start up - pacmyc - 8th Aug, 2013, 05:32 AM
RE: Automatically starting a webradio stream at start up - brantje - 8th Aug, 2013, 09:11 PM
RE: Automatically starting a webradio stream at start up - IriDium - 8th Aug, 2013, 09:16 PM
RE: Automatically starting a webradio stream at start up - brantje - 8th Aug, 2013, 10:00 PM
RE: Automatically starting a webradio stream at start up - Skywatch - 8th Aug, 2013, 11:27 PM
RE: Automatically starting a webradio stream at start up - pacmyc - 15th Aug, 2013, 05:17 AM
RE: Automatically starting a webradio stream at start up - rikardo1979 - 15th Aug, 2013, 06:04 AM
RE: Automatically starting a webradio stream at start up - pacmyc - 21st Aug, 2013, 04:20 AM
RE: Automatically starting a webradio stream at start up - pacmyc - 16th Aug, 2013, 05:43 AM
RE: Automatically starting a webradio stream at start up - rikardo1979 - 21st Aug, 2013, 04:25 AM
RE: Automatically starting a webradio stream at start up - IriDium - 21st Aug, 2013, 04:37 AM
RE: Automatically starting a webradio stream at start up - pacmyc - 6th Sep, 2013, 07:12 AM
RE: Automatically starting a webradio stream at start up - Skywatch - 6th Sep, 2013, 08:13 AM
RE: Automatically starting a webradio stream at start up - pacmyc - 6th Sep, 2013, 05:00 PM
Re: Automatically starting a webradio stream at start up - rikardo1979 - 6th Sep, 2013, 06:29 PM
RE: Automatically starting a webradio stream at start up - Skywatch - 6th Sep, 2013, 10:02 PM
Re: Automatically starting a webradio stream at start up - f1vefour - 7th Sep, 2013, 12:43 AM
RE: Automatically starting a webradio stream at start up - pacmyc - 8th Sep, 2013 01:37 AM
RE: Automatically starting a webradio stream at start up - f1vefour - 8th Sep, 2013, 08:46 AM
RE: Automatically starting a webradio stream at start up - pacmyc - 13th Sep, 2013, 03:49 AM
Re: Automatically starting a webradio stream at start up - f1vefour - 13th Sep, 2013, 01:48 PM

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 26th Jun, 2025, 04:34 AM Powered By MyBB, © 2002-2025 MyBB Group.