#! /bin/sh PGCTL="${PGINSTROOT}/bin/pg_ctl" start(){ echo "Starting ${PGTAGNAME}" su -l postgres -s /bin/sh -c "${PGCTL} start -D ${PGDATA} -l ${PMLOGFILE} -o '${PMOPTIONS}'" } stop(){ echo $"Stopping ${PGTAGNAME}" su -l postgres -s /bin/sh -c "${PGCTL} stop -D ${PGDATA} -s -m fast" } restart(){ stop start } reload(){ echo $"Reloading ${PGTAGNAME}" su -l postgres -s /bin/sh -c "${PGCTL} reload -D ${PGDATA} -s" } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart) restart ;; reload) reload ;; *) echo $"Usage: $0 {start|stop|restart|reload}" exit 1 esac exit 0