--- /etc/init.d/postgresql 2007-07-11 09:05:30.000000000 +0000 +++ /etc/init.d/postgresql 2008-03-24 19:40:25.000000000 +0000 @@ -23,16 +23,16 @@ ebegin "Starting PostgreSQL" - if [ -f "$PGDATA/postmaster.pid" ] ; then - rm -f "$PGDATA/postmaster.pid" + if [ -f "${PGDATA}/data/postmaster.pid" ] ; then + rm -f "${PGDATA}/data/postmaster.pid" fi + # We don't create the pid file in ${PGDATA}/data/postmaster.pid anymore, postmaster does start-stop-daemon --start \ - --pidfile "${PGDATA}/postmaster.pid" \ --chuid ${PGUSER}:${PGGROUP} \ --exec /usr/bin/postmaster \ -- \ - -D "${PGDATA}" \ + -D "${PGDATA}/data" \ --silent-mode=true \ ${PGOPTS} @@ -44,13 +44,13 @@ # Note: we have to do --oknodo here, otherwise it will always fail # when there are open transactions. This bug has been corrected # in baselayout-1.13.0_alpha8. - start-stop-daemon --stop --pidfile "${PGDATA}/postmaster.pid" \ + start-stop-daemon --stop --pidfile "${PGDATA}/data/postmaster.pid" \ --retry -TERM/${WAIT_FOR_DISCONNECT}/-INT/${WAIT_FOR_CLEANUP}/-QUIT --oknodo eend $? } reload() { ebegin "Reloading PostgreSQL configuration" - start-stop-daemon --stop --pidfile "${PGDATA}/postmaster.pid" --signal HUP --oknodo + start-stop-daemon --stop --pidfile "${PGDATA}/data/postmaster.pid" --signal HUP --oknodo eend $? }