#!/bin/sh # # Postgres Setup the postmaster daemon. # # Source function library. . /etc/rc.d/init.d/functions # See how we were called. case "$1" in start) echo -n "Starting Postgresql Deamon: " [ "`pidofproc postmaster`" != "" ] && exit su postgres -c "/usr/local/pgsql/bin/postmaster -i -B 256 '-o -S 2048' -S -D/usr/local/pgsql/data >>/opt/home/postgres/postmaster.log 2>&1 &" echo postmaster touch /var/lock/subsys/postmaster ;; stop) echo -n "Stopping Postgresql Deamon: " killproc postmaster echo rm -f /var/lock/subsys/postmaster ;; *) echo "Usage: postgres.init {start|stop}" exit 1 esac exit 0