diff options
author | Ryan Phillips <rphillips@gentoo.org> | 2002-10-28 01:26:00 +0000 |
---|---|---|
committer | Ryan Phillips <rphillips@gentoo.org> | 2002-10-28 01:26:00 +0000 |
commit | 246be10c75f960dd87b846830593d897d049e7da (patch) | |
tree | a75e5bee249a190f24d89d9c5c3898ae15cc4056 | |
parent | new vim patches (diff) | |
download | gentoo-2-246be10c75f960dd87b846830593d897d049e7da.tar.gz gentoo-2-246be10c75f960dd87b846830593d897d049e7da.tar.bz2 gentoo-2-246be10c75f960dd87b846830593d897d049e7da.zip |
fixes postgresql startup/shutdown issues. Fixes #9787
-rw-r--r-- | dev-db/postgresql/files/7.2.3/postgresql | 14 | ||||
-rw-r--r-- | dev-db/postgresql/files/postgresql | 13 | ||||
-rw-r--r-- | dev-db/postgresql/postgresql-7.2.3.ebuild | 5 |
3 files changed, 27 insertions, 5 deletions
diff --git a/dev-db/postgresql/files/7.2.3/postgresql b/dev-db/postgresql/files/7.2.3/postgresql index 0129b56440bf..e40f2fc37485 100644 --- a/dev-db/postgresql/files/7.2.3/postgresql +++ b/dev-db/postgresql/files/7.2.3/postgresql @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later -# /space/gentoo/cvsroot/gentoo-x86/dev-db/mysql/files/mysql.rc6,v 1.1 2002/01/06 00:53:24 woodchip Exp +# /space/gentoo/cvsroot/gentoo-x86/dev-db/postgresql/files/postgresql.rc6,v 1.1 2002/01/06 00:53:24 woodchip Exp depend() { need net @@ -9,13 +9,19 @@ depend() { start() { ebegin "Starting postgres" - start-stop-daemon --start --quiet --background --chuid postgres --exec \ - /usr/bin/postmaster -- -D/var/lib/postgresql/data -N 1024 -B 2048 + su - $PGUSER -c "/usr/bin/pg_ctl start -D '$PGDATA' -s -l '$PGLOG' -o '$PGOPTS'" eend $? } stop () { ebegin "Stopping postgres" - start-stop-daemon --stop --quiet --pidfile=/var/lib/postgresql/data/postmaster.pid + su - $PGUSER -c "/usr/bin/pg_ctl stop -D '$PGDATA' -s -m fast" eend $? } + +svc_restart () { + ebegin "Restarting postgres" + su - $PGUSER -c "/usr/bin/pg_ctl restart -D '$PGDATA' -s -m fast -l '$PGLOG' -o '$PGOPTS'" + eend $? +} + diff --git a/dev-db/postgresql/files/postgresql b/dev-db/postgresql/files/postgresql new file mode 100644 index 000000000000..dfc250b96122 --- /dev/null +++ b/dev-db/postgresql/files/postgresql @@ -0,0 +1,13 @@ +# PostgreSQL's Database Directory +PGDATA=/var/lib/postgresql/data + +# Logfile path: (NOTE: This must be uid/gid owned by the value of $PGUSER!) +PGLOG=/var/log/postgresql.log + +# Run the PostgreSQL user as: +PGUSER=postgres + +# Extra options to run postmaster with. +# If you want to enable TCP/IP for PostgreSQL, add -i to the following: +PGOPTS="-N 1024 -B 2048" + diff --git a/dev-db/postgresql/postgresql-7.2.3.ebuild b/dev-db/postgresql/postgresql-7.2.3.ebuild index 41653bbbcdb1..c5fd1a6da977 100644 --- a/dev-db/postgresql/postgresql-7.2.3.ebuild +++ b/dev-db/postgresql/postgresql-7.2.3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-7.2.3.ebuild,v 1.2 2002/10/18 11:14:00 mcummings Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-7.2.3.ebuild,v 1.3 2002/10/28 01:26:00 rphillips Exp $ IUSE="ssl nls java python tcltk perl" @@ -135,6 +135,9 @@ src_install () { exeinto /etc/init.d/ doexe ${FILESDIR}/${PV}/${PN} + + exeinto /etc/conf.d/ + doexe ${FILESDIR}/postgresql } pkg_postinst() { |