#!/bin/sh # # PostgreSQL start and shutdown script # # chkconfig: 345 90 11 # description: PostgreSQL start and shutdown script . /etc/init.d/functions case "$1" in start) su - postgres -c "pg_ctl -o \" -i\" start" touch /var/lock/subsys/postgres ;; stop) su - postgres -c "pg_ctl -m fast stop" rm -f /var/lock/subsys/postgres ;; *) echo "Usage: /etc/rc.d/init.d/postgresql {start|stop}" esac exit 0