summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPreston A. Elder <prez@gentoo.org>2002-06-20 14:12:49 +0000
committerPreston A. Elder <prez@gentoo.org>2002-06-20 14:12:49 +0000
commit0bcb5f350d52edfd048b27fd08d35e0b9be42b9d (patch)
tree2eaf5ea59db024cdc559be477eae9db778a63bd6 /dev-db/postgresql
parentadded filters (diff)
downloadhistorical-0bcb5f350d52edfd048b27fd08d35e0b9be42b9d.tar.gz
historical-0bcb5f350d52edfd048b27fd08d35e0b9be42b9d.tar.bz2
historical-0bcb5f350d52edfd048b27fd08d35e0b9be42b9d.zip
Built a better mouse trap (fixed the postgresql startup script)
Diffstat (limited to 'dev-db/postgresql')
-rw-r--r--dev-db/postgresql/files/7.2/postgresql40
1 files changed, 13 insertions, 27 deletions
diff --git a/dev-db/postgresql/files/7.2/postgresql b/dev-db/postgresql/files/7.2/postgresql
index a384c47a5354..f5a9e2fcb46a 100644
--- a/dev-db/postgresql/files/7.2/postgresql
+++ b/dev-db/postgresql/files/7.2/postgresql
@@ -1,35 +1,21 @@
#!/sbin/runscript
-
-PREFIX="/usr"
-PGDATA="/var/lib/postgresql/data"
-PGUSER="postgres"
-PATH="/bin:/usr/bin"
-DAEMON="$PREFIX/bin/pg_ctl"
-
-opts="start stop restart status"
+# 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
depend() {
- need net
-}
-
-start() {
- ebegin "Starting PostgreSQL"
- su - $PGUSER -c "$DAEMON start -D '$PGDATA' -s -o -i" | logger 1>&2 &
- eend $?
-}
-
-stop() {
- ebegin "Stopping PostgreSQL"
- su - $PGUSER -c "$DAEMON stop -D '$PGDATA' -s -m fast"
- eend $?
+ need net
}
-restart() {
- ebegin "Restarting PostgreSQL"
- su - $PGUSER -c "$DAEMON restart -D '$PGDATA' -s -m fast" &
- eend $?
+start() {
+ ebegin "Starting postgres"
+ start-stop-daemon --start --quiet --background --chuid postgres --exec \
+ /usr/bin/postmaster -- -D/var/lib/postgresql -N 1024 -B 2048
+ eend $?
}
-status() {
- su - $PGUSER -c "$DAEMON status -D '$PGDATA'"
+stop () {
+ ebegin "Stopping postgres"
+ start-stop-daemon --stop --quiet --pidfile=/var/lib/postgresql/postmaster.pid
+ eend $?
}