su postgres -c "/usr/bin/postmaster \
$([ "$ALLOW_TCP_CONNECTIONS" = yes ] && echo "-i") \
$([ -n "$MAX_NUM_BACKENDS" ] && echo "-N $MAX_NUM_BACKENDS") \
- $([ -n "$POSTGRES_DATA_DIR" ] && echo "-D $POSTGRES_DATA_DIR") \
+ $([ -n "POSTGRES_$DATA_DIR" ] && echo "-D $POSTGRES_DATA_DIR") \
-o \
$([ "$POSTGRES_QUIET" = yes ] && echo "-Q") \
- $([ "$POSTGRES_DIABLE_FSYNC" = yes ] && echo "-F") \
+ $([ "$POSTGRES_DIABLE_FSYNC" = yes ] && echo "-F") " \
&
+ sleep 2
if ps ax | grep -v grep | grep -q postmaster; then
deltext;ok
else
/sbin/chkconfig --add postgresql
# Create sample database
-if [ ! -f /var/state/psql/PG_VERSION ]; then
+if [ ! -f /var/state/pgsql/PG_VERSION ]; then
su postgres -c "LD_LIBRARY_PATH=%{_libdir} \
%{_bindir}/initdb --pgdata=/var/state/pgsql \
--pglib=%{_libdir}/pgsql"
%doc doc/*.ps.gz
%attr(754,root,root) /etc/rc.d/init.d/*
-%attr(640,root,root) /etc/sysconfig/*
+%attr(644,root,root) /etc/sysconfig/*
%attr(755,root,root) %{_bindir}/cleardbdir
%attr(755,root,root) %{_bindir}/createdb
ALLOW_TCP_CONNECTIONS=no
# Root of the tree of database directories
-DATA_DIR=/var/state/pgsql
+POSTGRES_DATA_DIR=/var/state/pgsql
# maximum number of backend server processes that this postmaster is allowed
# to start. If not specyfied is 32, and can be set as high as 1024 if your