Linux not starting postgres automatically - Mailing list pgsql-admin

From Jagdish rao
Subject Linux not starting postgres automatically
Date
Msg-id 20041021060242.27829.qmail@web60407.mail.yahoo.com
Whole thread Raw
Responses Re: Linux not starting postgres automatically
List pgsql-admin
hi friends

pls help me

i have a Linux redhat 9 machine
and i have installed the POstgres 7.4.5 using the
sources

the problem heppens when i want the postgres to start
automatically when my server is booted
i have written a shell script in rc.local for doing
this which looks as shown below
my applications like jonas are stared as User : root
i login as root which starts my applicatios
automatically
but as postgres has to be started only as user :
postgres
shell scripts stops at the command su postgres and
does not execute further.

i searched for help and some suggestions were

using chkconfig --add postgresql
when i did that it says error reading info on
postgresql service no such file or directory
i guess this is bcos postgres is not installed as a
service

so this didn't help

pls help me in achieving this .

#!bin/tcsh

ANT_HOME=/home/deploy/local/ant

JAVA_HOME=/home/deploy/local/jdk

JONAS_ROOT=/usr/local/JONAS414

PGDATA=/usr/local/pgsql/data

PATH=$JAVA_HOME/bin:/home/deploy/local/ant/bin:/usr/local/pgsql/bin:$PATH:/usr/local/JONAS414/bin/unix


CLASSPATH=:.:$JAVA_HOME/lib:/usr/local/kesintlclasses:/usr/local/JONAS414/lib/commons/j2ee/ejb-2_1-api.jar:/usr/local/JONAS414/lib/commons/j2ee/jta-spec1_0_1.jar

#export JONAS_ROOT PATH JAVA_HOME TOMCAT_HOME

export CLASSPATH PATH JAVA_HOME CATALINA_HOME
JONAS_ROOT PGDATA

echo 'set java home .........'
echo $JAVA_HOME
echo 'starting postgres.....'

(su postgres ; postmaster)

echo 'started postgres.....'


echo 'starting jonas.....'

jonas start









__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

pgsql-admin by date:

Previous
From: "Nikhil Parva"
Date:
Subject: unsubscribe
Next
From: Devrim GUNDUZ
Date:
Subject: Re: Linux not starting postgres automatically