summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-db/postgresql/files/7.2/postgresql35
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-db/postgresql/files/7.2/postgresql b/dev-db/postgresql/files/7.2/postgresql
new file mode 100644
index 000000000000..a384c47a5354
--- /dev/null
+++ b/dev-db/postgresql/files/7.2/postgresql
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+
+PREFIX="/usr"
+PGDATA="/var/lib/postgresql/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'"
+}