diff options
author | Geert Bevin <gbevin@gentoo.org> | 2002-02-16 14:04:22 +0000 |
---|---|---|
committer | Geert Bevin <gbevin@gentoo.org> | 2002-02-16 14:04:22 +0000 |
commit | 42fc680923162c04983c9d6d092ac3e8ec91196a (patch) | |
tree | 23be17383abdfcb520a3d39fa78cc83f5ec4be59 /dev-db/postgresql/files | |
parent | new revision that adds enlightenemnt to the kdm/gsm session lists via /etc/X1... (diff) | |
download | gentoo-2-42fc680923162c04983c9d6d092ac3e8ec91196a.tar.gz gentoo-2-42fc680923162c04983c9d6d092ac3e8ec91196a.tar.bz2 gentoo-2-42fc680923162c04983c9d6d092ac3e8ec91196a.zip |
added missing init script
Diffstat (limited to 'dev-db/postgresql/files')
-rw-r--r-- | dev-db/postgresql/files/7.2/postgresql | 35 |
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'" +} |