Re: [SLE] Staring programs at boot - first time at doing this



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



Relevant Pages

  • Re: FTP delete problem
    ... But i have wrote that manually the delete command it's OK!!! ... Dim strLocalFolderName, strFTPServerName, strLoginID ... In my script I use the options -s for the file. ... If i am in session in the server the scheduled script result OK. ...
    (microsoft.public.inetserver.iis.ftp)
  • Problems bringing up domains in a E10000 - Panic Boot
    ... bringing up the domains in the E10000 server doesn't work... ... Rebooting with command: boot disk0 -r ... Unit 0 Disk SEAGATE ST39103LCSUN9.0G034A9944632001 ...
    (SunManagers)
  • Re: Cant log into FC4, display keeps going "out of range"
    ... > Worked fine until the regular X server start during boot up. ... > In Grub I've tried seeing if I can access the xorg.conf file so I can ... I can think of 2 things to try to get to a command line: ...
    (comp.os.linux.misc)
  • Re: FTP in ASP.NET C#
    ... It has native .NET classes that will allow you to use the FTP protocol. ... >I would like to have my application FTP a file to a server after a user ... > ' This script assumes the file to be FTP'ed is in the same directory as ... > ' If there are multiple files to put, we need to use the command ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: replace field contents - record locking
    ... (windows, server 8, clients 8.5) ... If a user is in a record, then it is locked, and the replace command ... You can script navigation to force a record commit. ... successive editions of Filemaker have been successively slower. ...
    (comp.databases.filemaker)