diff options
author | Andreas Klemm <andreas@FreeBSD.org> | 2000-05-24 14:11:19 +0000 |
---|---|---|
committer | Andreas Klemm <andreas@FreeBSD.org> | 2000-05-24 14:11:19 +0000 |
commit | af0564d8098f5c0b1f1e45bc6fd9063da861aec2 (patch) | |
tree | 60ad29b6f1add9f775962ce2f81b7d58b51fa4ce /databases/postgresql74-server/files/pgsql.sh.tmpl | |
parent | 62b01f4f9c617d95df99b4a773a4bc228f177e60 (diff) |
upgrade postgresql to v 7.0 release
thanks for complete diffs ;-)
closed PR
PR: 18699
Obtained from: Palle Girgensohn <girgen@partitur.se>
Notes
Notes:
svn path=/head/; revision=28731
Diffstat (limited to 'databases/postgresql74-server/files/pgsql.sh.tmpl')
-rw-r--r-- | databases/postgresql74-server/files/pgsql.sh.tmpl | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/databases/postgresql74-server/files/pgsql.sh.tmpl b/databases/postgresql74-server/files/pgsql.sh.tmpl index f3c673b6aded..4f3575cd23cf 100644 --- a/databases/postgresql74-server/files/pgsql.sh.tmpl +++ b/databases/postgresql74-server/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 |