|
Sorry my post was ambiguous - I meant that I tried to edit it but could not get the -i option to work on the lines in the script which started and stopped postgres below :-
su -l postgres -s /bin/sh -c "/usr/bin/initdb --pgdata=/var/lib/pgsql/data > /dev/null 2>&1" < /dev/null
[ -f $PGDATA/PG_VERSION ] && echo_success
[ ! -f $PGDATA/PG_VERSION ] && echo_failure
echo
# Check for postmaster already running...
pid=`pidof -s postmaster`
if [ $pid ]
then
gprintf "Postmaster already running.\n"
else
#all systems go -- remove any stale lock files
rm -f /tmp/.s.PGSQL.* > /dev/null
gprintf "%s" "$PSQL_START"
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster start > /dev/null 2>&1" < /dev/null
sleep 1
pid=`pidof -s postmaster`
if [ $pid ]
then
success "%s" "$PSQL_START"
touch /var/lock/subsys/postgresql
echo $pid > /var/run/postmaster.pid
else
failure "%s" "$PSQL_START"
fi
fi
}
I have tried the -i option after the -D option/before it etc but could not get postgres to start this way.Can someone help?
Last edited by lolmc; 02-26-2003 at 03:02 AM.
|