From af0564d8098f5c0b1f1e45bc6fd9063da861aec2 Mon Sep 17 00:00:00 2001 From: Andreas Klemm Date: Wed, 24 May 2000 14:11:19 +0000 Subject: upgrade postgresql to v 7.0 release thanks for complete diffs ;-) closed PR PR: 18699 Obtained from: Palle Girgensohn --- databases/postgresql73/files/pgsql.sh.tmpl | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'databases/postgresql73/files/pgsql.sh.tmpl') diff --git a/databases/postgresql73/files/pgsql.sh.tmpl b/databases/postgresql73/files/pgsql.sh.tmpl index f3c673b6aded..4f3575cd23cf 100644 --- a/databases/postgresql73/files/pgsql.sh.tmpl +++ b/databases/postgresql73/files/pgsql.sh.tmpl @@ -14,12 +14,23 @@ # because the postmaster process, which starts up under the # environment of the pgsql user, sets this with the PGDATA # environment variable in !!PREFIX!!/pgsql/.profile -# +# - added (ugly) support for shutting down (girgen) +# - moved 2>&1 to end of line, so it'll actually work [if -S is removed] (girgen) -[ -d !!PREFIX!!/pgsql/lib ] && /sbin/ldconfig -m !!PREFIX!!/pgsql/lib - -[ -x !!PREFIX!!/pgsql/bin/postmaster ] && { +case $1 in +start) + [ -d !!PREFIX!!/pgsql/lib ] && /sbin/ldconfig -m !!PREFIX!!/pgsql/lib + [ -x !!PREFIX!!/pgsql/bin/postmaster ] && { su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/postmaster -i -S -o -F \ - 2>&1 > !!PREFIX!!/pgsql/errlog' - echo -n ' pgsql' -} + > !!PREFIX!!/pgsql/errlog 2>&1' + echo -n ' pgsql' + } + ;; +stop) + /usr/bin/killall postgres + ;; +*) + echo "usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; +esac -- cgit v1.2.3