# Get network config
. /etc/sysconfig/network
+PG_INIT_LOCALE=C
+
# Get service config
if [ -f /etc/sysconfig/postgresql ]; then
. /etc/sysconfig/postgresql
# $1 - db cluster
#
pgstart() {
+ is_no "$RC_LOGGING" && fork=--fork
msg_starting "PostgreSQL $1"
- daemon --user postgres /usr/bin/pg_ctl -s -w -D $1 start
+ daemon $fork --user postgres /usr/bin/pg_ctl -s -w -D $1 start
}
#
pgsubsys
}
+
+upstart_controlled --except status init
+
RETVAL=0
# See how we were called.
# Every action is performed for all given (all configured by default)
mkdir -p $pgdir
chmod 700 $pgdir
chown postgres:postgres $pgdir
- TMPDIR=/tmp su postgres -s /bin/sh -c "initdb -E UNICODE -D $pgdir"
+ LC_ALL=$PG_INIT_LOCALE TMPDIR=/tmp su postgres -s /bin/sh -c "initdb -E UNICODE -D $pgdir"
fi
done
echo $(nls "REMEMBER to setup password for user \"postgres\"")'!'