d87a4a6578
upgrade to the PostgreSQL 7.3 series and provide an update to the 7.2 series, 7.2.4. :~] This port _will_ be removed and should EOL'ed in about 6 months time. Since there is no future for these bits, ignore their heritage commit an orphan for the 7 series. See the postgresql7 port for future and past bits. This port is only intended to serve as a means of postponing an inevitable upgrade to recent release. DBAs, please plan and begin upgrading to 7.3.X, the grass really is greener. Release notes: http://developer.postgresql.org/docs/postgres/release-7-2-4.html PR: ports/48025 Submitted by: Palle Girgensohn <girgen@pingpong.net>
40 lines
788 B
Bash
40 lines
788 B
Bash
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
#
|
|
# For postmaster startup options, edit $PGDATA/postgresql.conf
|
|
|
|
PREFIX=%%PREFIX%%
|
|
PGBIN=${PREFIX}/bin
|
|
|
|
case $1 in
|
|
start)
|
|
[ -d ${PREFIX}/lib ] && /sbin/ldconfig -m ${PREFIX}/lib
|
|
touch /var/log/pgsql
|
|
chmod 600 /var/log/pgsql
|
|
chown pgsql:pgsql /var/log/pgsql
|
|
[ -x ${PGBIN}/pg_ctl ] && {
|
|
su -l pgsql -c \
|
|
'[ -d ${PGDATA} ] && exec %%PREFIX%%/bin/pg_ctl start -s -w -l /var/log/pgsql'
|
|
echo -n ' pgsql'
|
|
}
|
|
;;
|
|
|
|
stop)
|
|
[ -x ${PGBIN}/pg_ctl ] && {
|
|
su -l pgsql -c 'exec %%PREFIX%%/bin/pg_ctl stop -s -m fast'
|
|
echo -n ' pgsql'
|
|
}
|
|
;;
|
|
|
|
status)
|
|
[ -x ${PGBIN}/pg_ctl ] && {
|
|
exec su -l pgsql -c 'exec %%PREFIX%%/bin/pg_ctl status'
|
|
}
|
|
;;
|
|
|
|
*)
|
|
echo "usage: `basename $0` {start|stop|status}" >&2
|
|
exit 64
|
|
;;
|
|
esac
|