diff options
author | Masatomo Nakano <nakano@gentoo.org> | 2003-12-19 01:42:37 +0000 |
---|---|---|
committer | Masatomo Nakano <nakano@gentoo.org> | 2003-12-19 01:42:37 +0000 |
commit | e91ac3080daf71a7e024a14af89cdbb8254e3abe (patch) | |
tree | 40fa609530e362803581c51211b013d631648316 /dev-db/postgresql/files | |
parent | initial version (diff) | |
download | gentoo-2-e91ac3080daf71a7e024a14af89cdbb8254e3abe.tar.gz gentoo-2-e91ac3080daf71a7e024a14af89cdbb8254e3abe.tar.bz2 gentoo-2-e91ac3080daf71a7e024a14af89cdbb8254e3abe.zip |
Version bump.
Diffstat (limited to 'dev-db/postgresql/files')
-rw-r--r-- | dev-db/postgresql/files/digest-postgresql-7.3.5 | 4 | ||||
-rw-r--r-- | dev-db/postgresql/files/postgresql.init-7.3.5 | 55 |
2 files changed, 59 insertions, 0 deletions
diff --git a/dev-db/postgresql/files/digest-postgresql-7.3.5 b/dev-db/postgresql/files/digest-postgresql-7.3.5 new file mode 100644 index 000000000000..df4394a2c3a1 --- /dev/null +++ b/dev-db/postgresql/files/digest-postgresql-7.3.5 @@ -0,0 +1,4 @@ +MD5 071efb8cee72a62b4f0da478df39f08d postgresql-base-7.3.5.tar.bz2 5645560 +MD5 d106ee6a4b0fb1d63eb51525ee8faed6 postgresql-opt-7.3.5.tar.bz2 340898 +MD5 7354a7c9cc5f1203586131e454df270e postgresql-docs-7.3.5.tar.bz2 2336586 +MD5 0081cb994e22f6af83f1984fdaeed16e hier-Pg7.3-0.4.tar.gz 33264 diff --git a/dev-db/postgresql/files/postgresql.init-7.3.5 b/dev-db/postgresql/files/postgresql.init-7.3.5 new file mode 100644 index 000000000000..9ea516e3e0bb --- /dev/null +++ b/dev-db/postgresql/files/postgresql.init-7.3.5 @@ -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 $? +} |