From: | Doug McNaught <doug(at)wireboard(dot)com> |
---|---|
To: | Cindy <ctmoore(at)uci(dot)edu> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: auto start up at boot time |
Date: | 2002-01-09 23:57:28 |
Message-ID: | m3advn6psn.fsf@varsoon.denali.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Cindy <ctmoore(at)uci(dot)edu> writes:
> Hi, all. I'm trying to figure out how to have postmaster
> automatically restart upon rebooting (on a Sun Solaris system). I
> added a script to the /etc/rc3.d directory, but turns out it has to
> run under non-root privs. It referred to the INSTALL file for further
> info, but I couldn't find this file, and all the documentation I
> looked at discussed starting postmaster on the command line. Any
> suggestions or pointers to where I should look at?
1) You should put the script in /etc/init.d, and make links to it in
rc3.d and rc0.d (or whatever). See an existing init script for the
general idea.
2) The init script should do something like:
PGDATA=/usr/local/var/lib/pgsql; export PGDATA # or whatever you're using
# set any other needed environment variables here
su postgres -c "/usr/local/pgsql/bin/pg_ctl start"
-Doug
--
Let us cross over the river, and rest under the shade of the trees.
--T. J. Jackson, 1863
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Albertson | 2002-01-10 01:09:38 | Re: auto start up at boot time |
Previous Message | Darren Ferguson | 2002-01-09 23:39:46 | Re: auto start up at boot time |