summaryrefslogtreecommitdiff
path: root/databases/postgresql/files/pgsql.sh.tmpl
blob: 74b18e9a4939946d9c73cba77ba209c9636cbacd (plain)
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
26
#!/bin/sh

# $NetBSD: pgsql.sh.tmpl,v 1.3 1999/01/04 14:10:16 frueauf Exp $
# FreeBSD Id: pgsql.sh.tmpl,v 1.3 1997/10/05 21:00:49 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!!/!!PGUSER!!/data \
#   because the postmaster process, which starts up under the
#   environment of the pgsql user, sets this with the PGDATA
#   environment variable in !!PREFIX!!/!!PGUSER!!/.profile
#

[ -d !!PREFIX!!/!!PGUSER!!/lib ] && /sbin/ldconfig -m !!PREFIX!!/!!PGUSER!!/lib

[ -x !!PREFIX!!/pgsql/bin/postmaster ] && {
	su -l pgsql -c 'exec !!PREFIX!!/!!PGUSER!!/bin/postmaster \
		-S -o -F > !!PREFIX!!/!!PGUSER!!/errlog'
	echo -n ' pgsql' 
}