/etc/init.d

Tom H tomh0665 at gmail.com
Thu Jan 6 21:41:54 UTC 2011


On Thu, Jan 6, 2011 at 7:57 AM, stan <stanb at panix.com> wrote:
>
> A quick question. On 10.04, if I add a package that is _not_ from the
> Ubuntu respoitries, can I just put it's startup script in /etc/init.d, and
> expect thisngs to get started up on system boot? Or is there more I need to
> do/
>
> For instance, what control what runleves it is satrted and stoped at?

The simplest'd be to start the app from "/etc/rc.local".

If you'd like to do it "properly" (and be able to stop/start/restart
the app with service or a similar tool), you can either:

. create a sysvinit script in "/etc/init.d" and run, for example,
"update-rc.d yourscript start 30 2 3 4 5 . stop 70 0 1 6 ." making
sure that no app on which yours depends starts at 30 or higher.

. create an upstart script in "/etc/init".




More information about the ubuntu-users mailing list