aboutsummaryrefslogtreecommitdiffstats
path: root/databases/postgresql73-server/files/pgsql.sh.tmpl
diff options
context:
space:
mode:
authorandreas <andreas@FreeBSD.org>2000-05-24 22:11:19 +0800
committerandreas <andreas@FreeBSD.org>2000-05-24 22:11:19 +0800
commit09a52abee6c73f2c07ea160cd5f9490ddef3bc86 (patch)
tree0f5491570f8b663c705791fb4ce045416d8b1f13 /databases/postgresql73-server/files/pgsql.sh.tmpl
parent80e1dfb15983f72f88e0197b9dddbdeb7d979f7e (diff)
downloadfreebsd-ports-graphics-09a52abee6c73f2c07ea160cd5f9490ddef3bc86.tar.gz
freebsd-ports-graphics-09a52abee6c73f2c07ea160cd5f9490ddef3bc86.tar.zst
freebsd-ports-graphics-09a52abee6c73f2c07ea160cd5f9490ddef3bc86.zip
upgrade postgresql to v 7.0 release
thanks for complete diffs ;-) closed PR PR: 18699 Obtained from: Palle Girgensohn <girgen@partitur.se>
Diffstat (limited to 'databases/postgresql73-server/files/pgsql.sh.tmpl')
-rw-r--r--databases/postgresql73-server/files/pgsql.sh.tmpl25
1 files changed, 18 insertions, 7 deletions
diff --git a/databases/postgresql73-server/files/pgsql.sh.tmpl b/databases/postgresql73-server/files/pgsql.sh.tmpl
index f3c673b6ade..4f3575cd23c 100644
--- a/databases/postgresql73-server/files/pgsql.sh.tmpl
+++ b/databases/postgresql73-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