summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorGeert Bevin <gbevin@gentoo.org>2002-01-16 09:37:19 +0000
committerGeert Bevin <gbevin@gentoo.org>2002-01-16 09:37:19 +0000
commit6d72011ef5c8da633869f220b5194a71dd04d613 (patch)
treed5c5730fe5de270e1e97ca9854a479cef2c5cf57 /dev-db
parentsupport for postgres sql plugin (diff)
downloadgentoo-2-6d72011ef5c8da633869f220b5194a71dd04d613.tar.gz
gentoo-2-6d72011ef5c8da633869f220b5194a71dd04d613.tar.bz2
gentoo-2-6d72011ef5c8da633869f220b5194a71dd04d613.zip
forgot to commit this
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/postgresql/files/7.1.3/postgres35
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-db/postgresql/files/7.1.3/postgres b/dev-db/postgresql/files/7.1.3/postgres
new file mode 100644
index 000000000000..b4d12e60b5b9
--- /dev/null
+++ b/dev-db/postgresql/files/7.1.3/postgres
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+
+PREFIX="/usr"
+PGDATA="/var/db/pgsql/data"
+PGUSER="postgres"
+PATH="/bin:/usr/bin"
+DAEMON="$PREFIX/bin/pg_ctl"
+
+opts="start stop restart status"
+
+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 $?
+}
+
+restart() {
+ ebegin "Restarting PostgreSQL"
+ su - $PGUSER -c "$DAEMON restart -D '$PGDATA' -s -m fast" &
+ eend $?
+}
+
+status() {
+ su - $PGUSER -c "$DAEMON status -D '$PGDATA'"
+}