mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-04 22:33:27 +00:00
989d7f9fd3
Obtained from: Palle Girgensohn <girgen@partitur.se>
35 lines
739 B
Bash
35 lines
739 B
Bash
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
#
|
|
# 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/pg_ctl ] && {
|
|
su -l pgsql -c \
|
|
'exec !!PREFIX!!/pgsql/bin/pg_ctl -w start > !!PREFIX!!/pgsql/errlog 2>&1'
|
|
echo -n ' pgsql'
|
|
}
|
|
;;
|
|
|
|
stop)
|
|
[ -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|status}" >&2
|
|
exit 64
|
|
;;
|
|
esac
|