security, and feature additions. Reduce diffs between postgresql-devel port. Re-initdb required when upgrading from previous release. See release notes for details. Schemas added are system catalogs updated. ::braces for impact:: http://developer.postgresql.org/docs/postgres/release.html#RELEASE-7-3-1 PR: ports/46701 Submitted by: girgen@pingpong.net
49 lines
947 B
Bash
49 lines
947 B
Bash
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
#
|
|
# For postmaster startup options, edit $PGDATA/postgresql.conf
|
|
#
|
|
# Note that PGDATA is set in ~pgsql/.profile, don't try to manipulate it here!
|
|
#
|
|
|
|
PREFIX=%%PREFIX%%
|
|
PGBIN=${PREFIX}/bin
|
|
logfile=/var/log/pgsql
|
|
|
|
case $1 in
|
|
start)
|
|
touch ${logfile}
|
|
chmod 600 ${logfile}
|
|
chown pgsql:pgsql ${logfile}
|
|
[ -x ${PGBIN}/pg_ctl ] && {
|
|
su -l pgsql -c \
|
|
"[ -d \${PGDATA} ] && exec ${PREFIX}/bin/pg_ctl start -s -w -l ${logfile}"
|
|
echo -n ' pgsql'
|
|
}
|
|
;;
|
|
|
|
stop)
|
|
[ -x ${PGBIN}/pg_ctl ] && {
|
|
su -l pgsql -c "exec ${PREFIX}/bin/pg_ctl stop -s -m fast"
|
|
echo -n ' pgsql'
|
|
}
|
|
;;
|
|
|
|
restart)
|
|
[ -x ${PGBIN}/pg_ctl ] && {
|
|
exec su -l pgsql -c "exec ${PREFIX}/bin/pg_ctl restart -s -m fast"
|
|
}
|
|
;;
|
|
|
|
status)
|
|
[ -x ${PGBIN}/pg_ctl ] && {
|
|
exec su -l pgsql -c "exec ${PREFIX}/bin/pg_ctl status"
|
|
}
|
|
;;
|
|
|
|
*)
|
|
echo "usage: `basename $0` {start|stop|restart|status}" >&2
|
|
exit 64
|
|
;;
|
|
esac
|