diff options
author | 2003-07-31 03:14:40 +0000 | |
---|---|---|
committer | 2003-07-31 03:14:40 +0000 | |
commit | 3e2532ffd57fbf076e5291034c97141882bd4ec4 (patch) | |
tree | e4cb739d49fe658904710148ffa1a5ba6dc3a483 /dev-db/postgresql/files | |
parent | Version bumped. (diff) | |
download | historical-3e2532ffd57fbf076e5291034c97141882bd4ec4.tar.gz historical-3e2532ffd57fbf076e5291034c97141882bd4ec4.tar.bz2 historical-3e2532ffd57fbf076e5291034c97141882bd4ec4.zip |
Version bumped.
Diffstat (limited to 'dev-db/postgresql/files')
-rw-r--r-- | dev-db/postgresql/files/digest-postgresql-7.3.4 | 1 | ||||
-rw-r--r-- | dev-db/postgresql/files/postgresql.init-7.3.4 | 55 |
2 files changed, 56 insertions, 0 deletions
diff --git a/dev-db/postgresql/files/digest-postgresql-7.3.4 b/dev-db/postgresql/files/digest-postgresql-7.3.4 new file mode 100644 index 000000000000..67e5ed1a6f38 --- /dev/null +++ b/dev-db/postgresql/files/digest-postgresql-7.3.4 @@ -0,0 +1 @@ +MD5 82878d6d74c36384af3595d26ed38067 postgresql-7.3.4.tar.gz 11265028 diff --git a/dev-db/postgresql/files/postgresql.init-7.3.4 b/dev-db/postgresql/files/postgresql.init-7.3.4 new file mode 100644 index 000000000000..9ea516e3e0bb --- /dev/null +++ b/dev-db/postgresql/files/postgresql.init-7.3.4 @@ -0,0 +1,55 @@ +#!/sbin/runscript +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# /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 +} + +checkconfig() { + if [ ! -d $PGDATA ]; then + eerror "directory not found: $PGDATA" + eerror "You should create PGDATA directory first." + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting postgres" + if [ -f $PGDATA/postmaster.pid ]; then + rm $PGDATA/postmaster.pid + fi + su - $PGUSER -c "/usr/bin/pg_ctl start -D '$PGDATA' -s -l '$PGLOG' -o '$PGOPTS'" + + while : + do + cnt=$(($cnt + 1)) + if [ -f "$PGDATA/postmaster.pid" ]; then + ret=0 + break + fi + + if [ $cnt -eq 30 ]; then + eerror "Please see log file: $PGLOG" + ret=1 + break + fi + sleep 1 + done + eend $ret +} + +stop () { + ebegin "Stopping postgres" + 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 $? +} |