#!/bin/sh # # Startup script for PostgreSQL # # chkconfig: 345 86 15 # description: PostgreSQL server # processname: postgresql # pidfile: /usr/local/pgsql/data/postmaster.pid # config: /usr/local/pgsql/data/pg_hba.conf # . /etc/rc.d/init.d/functions # # Start/stop processes required for PostgreSQL # case "$1" in start) echo -n "Starting PostgreSQL Server: " su - postgres -c "/usr/local/pgsql/bin/postmaster -Si" echo ;; restart) $0 stop $0 start ;; stop) echo -n "Shutting down PostgreSQL Server: " su - postgres -c "/usr/local/pgsql/bin/pg_ctl -w stop" echo ;; *) echo "Usage: $0 {start|restart|stop}" exit 1 esac exit 0