summaryrefslogtreecommitdiff
path: root/databases/postgresql92-server/files/pgsql.sh.tmpl
blob: 9fd81e4ff367a57359bacccdf0f1e208fa58d08c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/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' 
}