1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-21 20:38:45 +00:00
freebsd-ports/databases/postgresql82-server/files/pgsql.sh.tmpl
Sean Chittenden 8a928af72d Introduce the world to PostgreSQL 7.4! By and large this release is
regarded as a major release with features with interest to those with
large databases.  The updates are extensive and the best source of info
is in the release notes.  Enjoy and direct questions to database@!

Release notes:
http://www.postgresql.org/docs/7.4/static/release.html#RELEASE-7-4

PR:		ports/59403, ports/59404, ports/59393, ports/59394,
		ports/59395, ports/59397, ports/59398, ports/59402, &&
		ports/59401
Submitted by:	maintainer
Approved by:	marcus (portmgr@ hat)
2003-12-04 12:00:49 +00:00

52 lines
948 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
case $1 in
start)
[ -x ${PGBIN}/pg_ctl ] && {
echo -n ' pgsql'
su -l pgsql -c \
"[ -d \${PGDATA} ] && exec ${PREFIX}/bin/pg_ctl start -s -w"
}
;;
stop)
[ -x ${PGBIN}/pg_ctl ] && {
echo -n ' pgsql'
su -l pgsql -c "exec ${PREFIX}/bin/pg_ctl stop -s -m fast"
}
;;
restart)
[ -x ${PGBIN}/pg_ctl ] && {
exec su -l pgsql -c "exec ${PREFIX}/bin/pg_ctl restart -s -m fast"
}
;;
reload)
[ -x ${PGBIN}/pg_ctl ] && {
exec su -l pgsql -c "exec ${PREFIX}/bin/pg_ctl reload"
}
;;
status)
[ -x ${PGBIN}/pg_ctl ] && {
exec su -l pgsql -c "exec ${PREFIX}/bin/pg_ctl status"
}
;;
*)
echo "usage: `basename $0` {start|stop|restart|reload|status}" >&2
exit 64
;;
esac