[root@b] : cat /etc/rc.d/init.d/postgresql
#!/bin/sh
#[ -x /tmp/.s.PGSQL.* ] && rm -f /tmp/.s.PGSQL.*
case "$1" in
'start')
su - postgres -c 'exec /usr/local/pgsql/bin/pg_ctl -o -i -D
/home/postgres/data start >> /usr/local/pgsql/errlog 2>&1 &'
;;
'stop')
su - postgres -c 'exec /usr/local/pgsql/bin/pg_ctl -D
/home/postgres/data stop >> /usr/local/pgsql/errlog 2>&1 &'
;;
*)
echo "usage: $0 start|stop"
exit 1
;;
esac
[root@b]:
That help? :)