Page 1 of 1
Autostart in ubuntu 9.10
Posted: Tue Dec 01, 2009 12:38 pm
by gcastell
OK, I just tried to do this using the instructions in the web site:
In the following we assume that your mediaserver (and the .ini file) are located in /opt. You should create the start script in /etc/init.d/rc3.d/S99mediaserver with the following contents:
#!/bin/sh
cd /opt
/opt/twonkymedia -D
The modifications are that since this is ubuntu the rc3.d folder is in /etc/rc3.d and twonky is in /opt/twonkymedia, I created the script put it in the right place.. and nothing, when I run the individual commands they work fine, help?
Here is my modified script:
Code: Select all
#!/bin/sh
cd /opt/twonkymedia
/opt/twonkymedia/twonkymedia -D
thanks!
Re: Autostart in ubuntu 9.10
Posted: Tue Dec 08, 2009 4:07 am
by gcastell
Anyone? help!
Re: Autostart in ubuntu 9.10
Posted: Tue Dec 08, 2009 9:39 pm
by PeeBee
Try running the S99mediaserver script manually.
PB
Re: Autostart in ubuntu 9.10
Posted: Thu Dec 10, 2009 9:15 am
by josch.hh
Forget about SysV Init scripts.
Since Ubuntu 9.10 we can use (thank god) Upstart.
So create a Upstart config file for twonky:
with the following in it (modifiy path to twonkymedia):
Code: Select all
# Start Twonky
start on runlevel 2
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
respawn
expect fork
exec /data/twonky/twonkymedia -logfile /var/log/twonky.log
post-stop script
sleep 5
end script
Now you can simply run the commands: start, stop, status and restart
Example: to restart twonky type:
Re: Autostart in ubuntu 9.10
Posted: Fri Mar 05, 2010 5:35 pm
by fboecom
I think upstart only works when you have logged in - no good. Should be a system service auto start.
Re: Autostart in ubuntu 9.10
Posted: Sat Mar 06, 2010 1:03 am
by DaemonBeetle
Just a forum over is
this thread that provides your answers.
Re: Autostart in ubuntu 9.10
Posted: Mon May 24, 2010 8:58 am
by josch.hh
fboecom wrote:I think upstart only works when you have logged in - no good. Should be a system service auto start.
Why, .... of course not. Do you know what Upstart is?
It is much better then SysV init, and of course it start TMS automatically as you can see in the example Upstart twonky.conf above.
Re: Autostart in ubuntu 9.10
Posted: Mon May 24, 2010 9:03 am
by josch.hh
DaemonBeetle wrote:Just a forum over is
this thread that provides your answers.
Nice thread, but why still using the "old" Twonky installer with SysV Init on a modern system like Ubuntu 9.10 or higher?
Forget the mentioned thread and install like that (even less work):
- Download manual install Twonky zip
- Extract it in one directory
- Create the Twonky Upstart ".conf" file (like from the example above in /etc/init (don't forget to customize the Twonky install dir in this script)
Ready to run Twonky!
And additionally next time you want to install a new release just stop Twonky remove old Twonky from install dir and extract new Twonk in install dir, restart Twonky -> Upgrade ready.