diff options
author | andreas <andreas@FreeBSD.org> | 2000-05-25 17:35:25 +0800 |
---|---|---|
committer | andreas <andreas@FreeBSD.org> | 2000-05-25 17:35:25 +0800 |
commit | 103d998a1cafce1a09ec3a7ec68edb3b8f443975 (patch) | |
tree | f1c51749540307bb56929ad8dd480e84e1c9af92 /databases/postgresql73-server/files | |
parent | e13591589356ab1ec04f5cda5715cb41419e1456 (diff) | |
download | freebsd-ports-gnome-103d998a1cafce1a09ec3a7ec68edb3b8f443975.tar.gz freebsd-ports-gnome-103d998a1cafce1a09ec3a7ec68edb3b8f443975.tar.zst freebsd-ports-gnome-103d998a1cafce1a09ec3a7ec68edb3b8f443975.zip |
make startup script work (start/stop)
Obtained from: Palle Girgensohn <girgen@partitur.se>
Diffstat (limited to 'databases/postgresql73-server/files')
-rw-r--r-- | databases/postgresql73-server/files/patch-bc | 5 | ||||
-rw-r--r-- | databases/postgresql73-server/files/pgsql.sh.tmpl | 38 |
2 files changed, 23 insertions, 20 deletions
diff --git a/databases/postgresql73-server/files/patch-bc b/databases/postgresql73-server/files/patch-bc new file mode 100644 index 000000000000..ff747fb84a2f --- /dev/null +++ b/databases/postgresql73-server/files/patch-bc @@ -0,0 +1,5 @@ +--- bin/pg_ctl/postmaster.opts.default.sample~ Mon Apr 17 05:45:17 2000 ++++ bin/pg_ctl/postmaster.opts.default.sample Tue May 23 02:46:30 2000 +@@ -1 +1 @@ +- ++-i -o "-F" diff --git a/databases/postgresql73-server/files/pgsql.sh.tmpl b/databases/postgresql73-server/files/pgsql.sh.tmpl index 4f3575cd23cf..e1673b4850c2 100644 --- a/databases/postgresql73-server/files/pgsql.sh.tmpl +++ b/databases/postgresql73-server/files/pgsql.sh.tmpl @@ -1,36 +1,34 @@ #!/bin/sh # $FreeBSD$ - -# pgsql.sh - postgresql startup file for FreeBSD and possibly *BSD (untested) - -# Changes: -# - renamed startup script to be in sync with INSTALL file -# - merged ldconfig start sequence from former postgrsql.sh script (andreas) -# - modified the postmaster startup sequence as suggested in the -# INSTALL file which was given as example for FreeBSD 2.2 (andreas) -# - removed the commandline option -# -D!!PREFIX!!/pgsql/data \ -# 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) +# +# For postmaster startup options, edit $PGDATA/postmaster.opts.default +# Preinstalled options are -i -o "-F" 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 \ - > !!PREFIX!!/pgsql/errlog 2>&1' + [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { + su -l pgsql -c \ + 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w start > !!PREFIX!!/pgsql/errlog 2>&1' echo -n ' pgsql' } ;; + stop) - /usr/bin/killall postgres + [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { + su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + } ;; + +status) + [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { + su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + } + ;; + *) - echo "usage: `basename $0` {start|stop}" >&2 + echo "usage: `basename $0` {start|stop|status}" >&2 exit 64 ;; esac |