diff options
author | Masatomo Nakano <nakano@gentoo.org> | 2005-04-13 11:09:46 +0000 |
---|---|---|
committer | Masatomo Nakano <nakano@gentoo.org> | 2005-04-13 11:09:46 +0000 |
commit | d57955e7e88e8986da11cb354198115b9fa6239f (patch) | |
tree | bd4e4ce7bcf4f0071320c3feefa2a554a9fddcfe /dev-db/postgresql/files | |
parent | Fix install locations. (diff) | |
download | gentoo-2-d57955e7e88e8986da11cb354198115b9fa6239f.tar.gz gentoo-2-d57955e7e88e8986da11cb354198115b9fa6239f.tar.bz2 gentoo-2-d57955e7e88e8986da11cb354198115b9fa6239f.zip |
readded
(Portage version: 2.0.51.19)
Diffstat (limited to 'dev-db/postgresql/files')
-rw-r--r-- | dev-db/postgresql/files/digest-postgresql-7.3.6-r2 | 3 | ||||
-rw-r--r-- | dev-db/postgresql/files/postgresql.init-7.3.6 | 63 |
2 files changed, 66 insertions, 0 deletions
diff --git a/dev-db/postgresql/files/digest-postgresql-7.3.6-r2 b/dev-db/postgresql/files/digest-postgresql-7.3.6-r2 new file mode 100644 index 000000000000..2e476ab072c6 --- /dev/null +++ b/dev-db/postgresql/files/digest-postgresql-7.3.6-r2 @@ -0,0 +1,3 @@ +MD5 80b1649458ed7b0e765fb19bcb81c7aa postgresql-base-7.3.6.tar.bz2 5647447 +MD5 49b6faa1698c6d9f357e13236f7ca777 postgresql-opt-7.3.6.tar.bz2 341096 +MD5 ec0cf85996049eb0180a2163c482c02c postgresql-docs-7.3.6.tar.bz2 2337333 diff --git a/dev-db/postgresql/files/postgresql.init-7.3.6 b/dev-db/postgresql/files/postgresql.init-7.3.6 new file mode 100644 index 000000000000..38ad684245e6 --- /dev/null +++ b/dev-db/postgresql/files/postgresql.init-7.3.6 @@ -0,0 +1,63 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/files/postgresql.init-7.3.6,v 1.4 2005/04/13 11:09:46 nakano Exp $ + +opts="${opts} reload" + +depend() { + use 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 PostgreSQL" + 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 PostgreSQL" + su - $PGUSER -c "/usr/bin/pg_ctl stop -D '$PGDATA' -s -m fast" + eend $? +} + +svc_restart() { + ebegin "Restarting PostgreSQL" + su - $PGUSER -c "/usr/bin/pg_ctl restart -D '$PGDATA' -s -m fast -l '$PGLOG' -o '$PGOPTS'" + eend $? +} + +reload() { + ebegin "Reloading PostgreSQL configuration" + su - $PGUSER -c "/usr/bin/pg_ctl reload -D '$PGDATA' -s" + eend $? +} |