Start at boot in Ubuntu

Linux and UNIX specific discussions
Post Reply
myklej
Posts: 4
Joined: Tue Feb 19, 2008 9:52 pm

Start at boot in Ubuntu

Post by myklej » Tue Feb 19, 2008 10:04 pm

I've installed the latest twonky server on ubuntu 7.10, but I have some problems getting it to start automatically when the server boots.

The twonkyserver script is placed in /etc/init.d and I have installed it in the default runlevels using update-rc.d. After the server is reebooted there are two twonky processes running, but the server is not visible in any clients. If I restart twonky with 'sudo /etc/init.d/twonkyserver restart' the server shows up. Does anybody have a clue whats wrong?

tuxxdk
Posts: 5
Joined: Tue Feb 26, 2008 1:17 am
AV Hardware: PS3

Re: Start at boot in Ubuntu

Post by tuxxdk » Tue Feb 26, 2008 1:20 am

Hi.

I have the exact same problem with my Ubuntu 7.10 and Twonkyserver.

Did everyting "by the book" and issuing /etc/init.d/twonkyserver tells me it IS running, however no units can see it. Restarting it solves it all, but that's not a keen solution.

Anyone?

simpel
Posts: 1
Joined: Sun Mar 02, 2008 2:55 pm
AV Hardware: Maxtor Shared Storage, Soundbridge, Gigaset M740AV, Ubuntu-Server

Re: Start at boot in Ubuntu

Post by simpel » Mon Mar 03, 2008 7:54 am

I had the same problem. The server couldn´t be seen from any client. But when i started a local cidero, i could see the twonkyserver. I think the problem is, twoky is only started on the ip-adress -> "localhost". The webinterface could be started with http://localhost:9000. I saw in the FAQ that you can give the IP-adress by the command -ip xxx.xxx.xxx.xxx . I solved the problem by editing the startupscript in /usr/init.d/twonkyserver. Now everything is OK. By the way, the webinterface is now only reachable with my direct IP-adress.

I hope i could help.

Greetings

Achim

myklej
Posts: 4
Joined: Tue Feb 19, 2008 9:52 pm

Re: Start at boot in Ubuntu

Post by myklej » Sat Mar 08, 2008 2:10 pm

Hi,

Thanks a lot! That solved my problems.

gusmax777
Posts: 2
Joined: Sun Feb 03, 2008 6:52 pm

Re: Start at boot in Ubuntu

Post by gusmax777 » Sun Mar 09, 2008 8:57 am

Hi!

Can you tell me what you have changed on the startscript? I have tryed severl things but nothing helped. Thanks in advance...

Cheers, Gusmax

myklej
Posts: 4
Joined: Tue Feb 19, 2008 9:52 pm

Re: Start at boot in Ubuntu

Post by myklej » Sun Mar 09, 2008 1:12 pm

Hi,

Look for the following lines in the startscript:

Code: Select all

echo -n "Starting $TWONKYSRV ... "
$TWONKYSRV -D -inifile "${INIFILE}"
rc_status -v
and change it to

Code: Select all

echo -n "Starting $TWONKYSRV ... "
$TWONKYSRV -D -ip xxx.xxx.xxx.xxx -inifile "${INIFILE}"
rc_status -v

tuxxdk
Posts: 5
Joined: Tue Feb 26, 2008 1:17 am
AV Hardware: PS3

Re: Start at boot in Ubuntu

Post by tuxxdk » Thu Mar 20, 2008 5:03 pm

OMG... thanks a bunch! Totally solved it here too!

Just one question.. I use DHCP and 9/10 I get the same IP so it usually is not a problem. However can I fix this in a smart way so I don't have to edit the script if/when I get another IP than the "normal" one? (static IP is not an option, sorry).

tuxxdk
Posts: 5
Joined: Tue Feb 26, 2008 1:17 am
AV Hardware: PS3

Re: Start at boot in Ubuntu

Post by tuxxdk » Thu Mar 20, 2008 5:10 pm

I might be able to answer myself this question.

Following this intel:

http://www.twonkyvision.com/Support/FAQ ... inux&n=1:8

and using that solution without the -ip tag in the script also seems to work.

Damn this is so good.. now I can with ease get my license and start enjoying a fully automated DLNA-server.

This forum is great! :mrgreen:

tuxxdk
Posts: 5
Joined: Tue Feb 26, 2008 1:17 am
AV Hardware: PS3

Re: Start at boot in Ubuntu

Post by tuxxdk » Thu Mar 20, 2008 11:32 pm

And... I was too swift to asume all was okay :? The ip-parameter is still needed. Dunno how it worked once for me, but after a complete shutdown it didn'e any longer.

myklej
Posts: 4
Joined: Tue Feb 19, 2008 9:52 pm

Re: Start at boot in Ubuntu

Post by myklej » Fri Mar 21, 2008 8:40 am

Hi,

You can try to use this command to find your IP-address:

/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'

I haven't tried it in the startup script because I'm not at home, but it should work.

tuxxdk
Posts: 5
Joined: Tue Feb 26, 2008 1:17 am
AV Hardware: PS3

Re: Start at boot in Ubuntu

Post by tuxxdk » Sat Mar 22, 2008 11:58 am

Hello

I'll write that down for a keeper.

However I found another solution and I'm still confused why I'd even need that.

I fired up webmin because I was looking to set a statip IP (I feel more comfy using webmin for such things). I then under Network Interfaces saw that eth0 wasn't started at boot.. WTF?? I was like w00t because it somehow had to be started since all network was working.

Nevertheless I chose to activate it at boot. Saved settings and removed the ip-bit from my twonky script. Rebooted and it worked?! Ok I tried to shut it all completely down and start up again - this time my server got another IP from dhcp but it still worked! And after a good nights sleep I fired up my server this morning and it still worked.

So I'll say that this is as good as solved for my part at least. Man this is great.

HornedBeast
Posts: 33
Joined: Mon Apr 21, 2008 3:17 pm
AV Hardware: XBOX 360
Linksys Router
Linux, Ubuntu Server 8.04.

Re: Start at boot in Ubuntu

Post by HornedBeast » Thu May 01, 2008 5:10 pm

I've written a fairly comprehensive guide on how to install and make TwonkyMedia start at boot on Ubuntu Server 8.04, 32bit or 64bit.

http://www.twonkyforum.com/viewtopic.php?f=6&t=5065

Give it a lookey :)

Post Reply