1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-04 22:33:27 +00:00
freebsd-ports/databases/postgresql7/files/pgsql.sh.tmpl
Andreas Klemm a53f1f9a5e - remove the ampersand, postmaster process automatically goes into
background because of the -S option.
- remove the -D datadir option, it's meaningless, because the pgsql
  user environment overwrites it with the PGDATA env variable.
  Since this is important and might cause some headache, I mentioned
  this in ~pgsql/.profile and the startup script.
Submitted by:	John Fiber
1997-10-05 21:00:49 +00:00

26 lines
909 B
Bash

#!/bin/sh
# $Id: pgsql.sh.tmpl,v 1.2 1997/10/03 18:26:54 andreas Exp $
# 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
#
[ -d !!PREFIX!!/pgsql/lib ] && /sbin/ldconfig -m !!PREFIX!!/pgsql/lib
[ -x !!PREFIX!!/pgsql/bin/postmaster ] && {
su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/postmaster \
-S -o -F > !!PREFIX!!/pgsql/errlog'
echo -n ' pgsql'
}