Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Sep 2003 18:17:15 +0200
From:      David Landgren <david@landgren.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: How to run PostgreSQL on boot?
Message-ID:  <3F53710B.7060004@landgren.net>
In-Reply-To: <000001c3709f$8f45e7a0$0400a8c0@fire>
References:  <000001c3709f$8f45e7a0$0400a8c0@fire>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Alex Zivenko wrote:
> Hi all!
> I need to run Postgresql server on startup. It means, that I need to start postmaster every boot. How can I do this?
> Sorry for my english.

I have the following file on the servers that run Postgresql, named 
/usr/local/etc/rc.d/postgresql.sh:

#! /bin/sh

su postgres -c '/home/pgsql/bin/pg_ctl start \
   -D /home/pgsql/data -l /var/log/postgresql'

You will probably have to change paths etc. to suit your site, but 
this is the general idea.

David



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?3F53710B.7060004>