Re: [SLE] Staring programs at boot - first time at doing this
- From: Dave Howorth <dhoworth@xxxxxxxxxxxxxxxxx>
- Date: Fri, 13 Oct 2006 14:47:41 +0100
John wrote:
Now I'm getting confused (which, let's face it doesn't take much these
days).
To recap, my SuSE 10 server boots to runlevel 3.
In event of power outage, for example, I need to issue a command line
similar to:
su -c postmaster -D ... postgresql_user &
to get my database started.
If I put it into boot-local, it looks as if this command will run before
postgres is loaded and will, therefore, fail.
I think there may be some terminological differences that are causing
confusion.
postgresql is a database server. It contains data in one or more
databases. Assuming you installed postgresql from Suse's packages, then
all that is needed to start the database server, and all the databases
in it at boot-time is to use the run-level editor in YaST. You don't
need to write any scripts.
I don't think I'm looking for the complexity of adapting the
/etc/init.d/skeleton file but I'm willing to be proven wrong here since
this is the first time I've looked seriously at a boot script.
I think you're saying that you have a separate script - postgresql_user
- that presumably uses one of the databases? And that you want to start
as a server process at boot time? If so, then yes, you want to adapt the
skeleton. If not, what's in your script?
Read the section on adding init scripts in the admin guide.
To my simplistic, naive way of thinking, what I'd like to do is put this
command line into a script file and get the boot process to fire it for
me, regardless of the target run level, although I have restricted the
server to 3.
Yup, that's what init.d is all about.
Cheers, Dave
PS
Or do I just need to copy /etc/init.d/skeleton to, say,
my_postgres_startup in the same directory and add my
command line in the section case start)?
Quite likely. You may also need to add something to close it down, and
in an ideal world, something to get the operational status. Depends what
your server is doing.
--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-faq@xxxxxxxx
- References:
- [SLE] SPAM: Staring programs at boot - first time at doing this
- From: John
- Re: [SLE] SPAM: Staring programs at boot - first time at doing this
- From: Patrick Shanahan
- Re: [SLE] SPAM: Staring programs at boot - first time at doing this
- From: stephan beal
- Re: [SLE] Staring programs at boot - first time at doing this
- From: John
- [SLE] SPAM: Staring programs at boot - first time at doing this
- Prev by Date: Re: [SLE] Staring programs at boot - first time at doing this
- Next by Date: Re: SPAM: Re: [SLE] VMware problem on SuSE 10.1
- Previous by thread: [SLE] SPAM: SOLVED: Re: [SLE] Staring programs at boot - first time at doing this
- Next by thread: SPAM: [SLE] Video, keyboard and mouse dies requiring reboot
- Index(es):
Relevant Pages
|