1997-10-03 10:13:36 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
1999-08-29 07:03:05 -04:00
|
|
|
# $FreeBSD$
|
1997-10-03 10:13:36 -04:00
|
|
|
|
|
|
|
# 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)
|
1997-10-05 17:00:49 -04:00
|
|
|
# - 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
|
|
|
|
#
|
1997-10-03 10:13:36 -04:00
|
|
|
|
|
|
|
[ -d !!PREFIX!!/pgsql/lib ] && /sbin/ldconfig -m !!PREFIX!!/pgsql/lib
|
|
|
|
|
|
|
|
[ -x !!PREFIX!!/pgsql/bin/postmaster ] && {
|
1998-04-21 17:52:10 -04:00
|
|
|
su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/postmaster -i -S -o -F \
|
1999-07-21 03:16:27 -04:00
|
|
|
2>&1 > !!PREFIX!!/pgsql/errlog'
|
1997-10-03 10:13:36 -04:00
|
|
|
echo -n ' pgsql'
|
|
|
|
}
|