diff options
author | 2006-09-05 21:29:54 +0000 | |
---|---|---|
committer | 2006-09-05 21:29:54 +0000 | |
commit | 81445751ef477fc9e154acfee889120ca6a647f6 (patch) | |
tree | 9f2b6a26387cff875bf9ee051515ec4a9ecd66c7 /dev-db/pgcluster/files | |
parent | dev-db/pgpool: Version bump to 3.1.1 (diff) | |
download | testing-81445751ef477fc9e154acfee889120ca6a647f6.tar.gz testing-81445751ef477fc9e154acfee889120ca6a647f6.tar.bz2 testing-81445751ef477fc9e154acfee889120ca6a647f6.zip |
dev-db/pgcluster: 1.5 tree addition
svn path=/testing/; revision=83
Diffstat (limited to 'dev-db/pgcluster/files')
-rw-r--r-- | dev-db/pgcluster/files/digest-pgcluster-1.5.0_rc7 | 3 | ||||
-rw-r--r-- | dev-db/pgcluster/files/pgcluster.conf-1.5.0_rc7 | 14 | ||||
-rw-r--r-- | dev-db/pgcluster/files/pgcluster.init-1.5.0_rc7 | 90 | ||||
-rw-r--r-- | dev-db/pgcluster/files/pglb.conf-1.5.0_rc7 | 2 | ||||
-rwxr-xr-x | dev-db/pgcluster/files/pglb.init-1.5.0_rc7 | 20 | ||||
-rw-r--r-- | dev-db/pgcluster/files/pgreplicate.conf-1.5.0_rc7 | 2 | ||||
-rwxr-xr-x | dev-db/pgcluster/files/pgreplicate.init-1.5.0_rc7 | 23 |
7 files changed, 154 insertions, 0 deletions
diff --git a/dev-db/pgcluster/files/digest-pgcluster-1.5.0_rc7 b/dev-db/pgcluster/files/digest-pgcluster-1.5.0_rc7 new file mode 100644 index 0000000..cf08710 --- /dev/null +++ b/dev-db/pgcluster/files/digest-pgcluster-1.5.0_rc7 @@ -0,0 +1,3 @@ +MD5 973c405f6ecb6685be6ac2d20a9d63af pgcluster-1.5.0rc7.tar.gz 14878373 +RMD160 e0b5e2647d45553a3fadcc83a2e788278dbf4b71 pgcluster-1.5.0rc7.tar.gz 14878373 +SHA256 b01eb279d55ec34adeec9205421391a750f2cc306e54aaafbf084cf5028be85a pgcluster-1.5.0rc7.tar.gz 14878373 diff --git a/dev-db/pgcluster/files/pgcluster.conf-1.5.0_rc7 b/dev-db/pgcluster/files/pgcluster.conf-1.5.0_rc7 new file mode 100644 index 0000000..247c8ab --- /dev/null +++ b/dev-db/pgcluster/files/pgcluster.conf-1.5.0_rc7 @@ -0,0 +1,14 @@ +# 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/lib/postgresql/data/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 -i" +PGOPTS="-i" + diff --git a/dev-db/pgcluster/files/pgcluster.init-1.5.0_rc7 b/dev-db/pgcluster/files/pgcluster.init-1.5.0_rc7 new file mode 100644 index 0000000..d5824ba --- /dev/null +++ b/dev-db/pgcluster/files/pgcluster.init-1.5.0_rc7 @@ -0,0 +1,90 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +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_recover() { + ebegin "Starting PGCluster" + 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 -R'" + + 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 + +} + +start() { + checkconfig || return 1 + + ebegin "Starting PGCluster" + 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 PGCluster" + su - $PGUSER -c "/usr/bin/pg_ctl stop -D '$PGDATA' -s -m fast" + eend $? +} + +svc_restart() { + ebegin "Restarting PGCluster" + su - $PGUSER -c "/usr/bin/pg_ctl restart -D '$PGDATA' -s -m fast -l '$PGLOG' -o '$PGOPTS'" + eend $? +} + +reload() { + ebegin "Reloading PGCluster configuration" + su - $PGUSER -c "/usr/bin/pg_ctl reload -D '$PGDATA' -s" + eend $? +} diff --git a/dev-db/pgcluster/files/pglb.conf-1.5.0_rc7 b/dev-db/pgcluster/files/pglb.conf-1.5.0_rc7 new file mode 100644 index 0000000..37fbd86 --- /dev/null +++ b/dev-db/pgcluster/files/pglb.conf-1.5.0_rc7 @@ -0,0 +1,2 @@ +# Run the load balancer user as: +PGUSER=postgres diff --git a/dev-db/pgcluster/files/pglb.init-1.5.0_rc7 b/dev-db/pgcluster/files/pglb.init-1.5.0_rc7 new file mode 100755 index 0000000..71527c1 --- /dev/null +++ b/dev-db/pgcluster/files/pglb.init-1.5.0_rc7 @@ -0,0 +1,20 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/pgcluster/files/pglb.init-1.3.0b,v 1.1 2005/02/27 07:20:28 nakano Exp $ + +depend() { + use net pgreplicate pgcluster +} + +start() { + ebegin "Starting PGCluster Load Balance" + su - $PGUSER -c "/usr/bin/pglb -D /etc/pgcluster" + +} + +stop() { + ebegin "Stopping PGCluster Load Balance" + su - $PGUSER -c "/usr/bin/pglb -D /etc/pgcluster stop" + eend $? +} diff --git a/dev-db/pgcluster/files/pgreplicate.conf-1.5.0_rc7 b/dev-db/pgcluster/files/pgreplicate.conf-1.5.0_rc7 new file mode 100644 index 0000000..a6bf029 --- /dev/null +++ b/dev-db/pgcluster/files/pgreplicate.conf-1.5.0_rc7 @@ -0,0 +1,2 @@ +# Run the pgreplicate user as: +PGUSER=postgres diff --git a/dev-db/pgcluster/files/pgreplicate.init-1.5.0_rc7 b/dev-db/pgcluster/files/pgreplicate.init-1.5.0_rc7 new file mode 100755 index 0000000..048123e --- /dev/null +++ b/dev-db/pgcluster/files/pgreplicate.init-1.5.0_rc7 @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/pgcluster/files/pgreplicate.init-1.3.0b,v 1.1 2005/02/27 07:20:28 nakano Exp $ + +depend() { + use net +} + +start() { + ebegin "Starting PGCluster Replication Server" + if [ -f /var/lib/pgcluster/pgreplicate.pid ]; then + rm /var/lib/pgcluster/pgreplicate.pid + fi + su - $PGUSER -c "/usr/bin/pgreplicate -W /var/lib/pgcluster -D /etc/pgcluster" + eend $? +} + +stop() { + ebegin "Stopping PGCluster Replication Server" + su - $PGUSER -c "/usr/bin/pgreplicate -W /var/lib/pgcluster -D /etc/pgcluster stop" + eend $? +} |