--- postgresql.init-8.2.orig 2009-06-17 18:34:51.000000000 -0300 +++ postgresql.init-8.2 2009-06-17 19:19:02.000000000 -0300 @@ -58,8 +58,8 @@ local retval - su -l ${PGUSER} \ - -c "env PGDATA=\"${PGDATA}\" /usr/lib/postgresql-8.2/bin/pg_ctl stop -t ${WAIT_FOR_DISCONNECT} -m smart" + start-stop-daemon --stop --pidfile "${PGDATA}/postmaster.pid" \ + --retry -TERM/${WAIT_FOR_DISCONNECT} retval=$? [ $retval -eq 0 ] && eend $retval && return $retval