auto start up at boot time

Started by Cindyabout 24 years ago4 messagesgeneral
Jump to latest
#1Cindy
ctmoore@uci.edu

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?

Thanks,
--Cindy
--
ctmoore@uci.edu

#2Darren Ferguson
darren@crystalballinc.com
In reply to: Cindy (#1)
Re: auto start up at boot time

You could try using the command

su <unpriveldged user> -c <command you want to run>

Make that your script and you should not have any problems

Darren

Darren Ferguson

On Wed, 9 Jan 2002, Cindy wrote:

Show quoted text

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?

Thanks,
--Cindy
--
ctmoore@uci.edu

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

#3Doug McNaught
doug@wireboard.com
In reply to: Cindy (#1)
Re: auto start up at boot time

Cindy <ctmoore@uci.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

#4Chris Albertson
chrisalbertson90278@yahoo.com
In reply to: Doug McNaught (#3)
Re: auto start up at boot time

I run Postgresql on Solaris 8. e-mail me off line and I'll
send you the script I use in /etc/init.d I think however
it comes with the Postgresql tar file distribution. Look
around for it first. But ask and I'll send it.

--- Doug McNaught <doug@wireboard.com> wrote:

Cindy <ctmoore@uci.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

---------------------------(end of
broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

=====
Chris Albertson
Home: 310-376-1029 chrisalbertson90278@yahoo.com
Cell: 310-990-7550
Office: 310-336-5189 Christopher.J.Albertson@aero.org

__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/