Startup script - Mailing list pgsql-novice

From Hari Bhanujan
Subject Startup script
Date
Msg-id 000501c407ae$5cc959a0$0600a8c0@Bhanujan.local
Whole thread Raw
List pgsql-novice

To all :

 

I am using Postgresql 7.4.1 (pgversion : 7.4). The database has been configured properly but during startup and shutdown for which the following scripts are entered

 

Start(){

 

        # <poweruser> database

        echo "Starting <poweruser> Database"

        PG<POWERUSER>="start -D /u/www/<poweruser>/db/data -o '-i -p 5233' -l /u/www/<poweruser>/log/dblog"

        su -l <poweruser> -s /bin/sh -c "/usr/bin/pg_ctl $PG<POWERUSER> > /dev/null 2>&1" < /dev/null

 

}

 

stop(){

 

        echo "Stopping <poweruser> Database"

        su -l <poweruser> -s /bin/sh -c "/usr/bin/pg_ctl stop -D /u/www/<poweruser>/db/data -s -m fast" > /dev/null 2>&1

 

}

 

 

However, once the machine is rebooted and I am logged in as the <poweruser> and type in psql – I get the error that postmaster is not running. Is there something else that should be here..

 

Please advise and thanks

Hari

pgsql-novice by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: composite primary key to foreign key
Next
From: Jacques Capesius
Date:
Subject: PHP/PGSQL error after rebooting