All,
I need some help editing a shell script please. I have redhat 7.2.
I need to add the -i flag to the postmaster command line to enable remote connections (I am running pgadmin2 from my windows box).
This shell command worked(initially from root):
# su postgres
# /usr/bin/postmaster -i -D /var/lib/pgsql/data
Problem is, relevent line of the postgresql shell script is greek to me:
Code:
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -i -D $PGDATA -p /usr/bin/postmaster start > /dev/null 2>&1" < /dev/null
here is a larger section, for contextual purposes:
Code:
else
#all systems go -- remove any stale lock files
rm -f /tmp/.s.PGSQL.* > /dev/null
echo -n "$PSQL_START"
# -i flag added by taff in line below
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -i -D $PGDATA -p /usr/bin/postmaster start > /dev/null 2>&1" < /dev/null
sleep 1
pid=`pidof -s postmaster`
if [ $pid ]
then
if echo "$TYPESET"|grep "declare -f success ()" >/dev/null
then
success "$PSQL_START"
else
echo " [ OK ]"
fi
touch /var/lock/subsys/postgresql
echo $pid > /var/run/postmaster.pid
echo
else
if echo "$TYPESET"|grep "declare -f failure ()" >/dev/null
then
failure "$PSQL_START"
else
echo " [ FAILED ]"
fi
echo
fi
fi
}
Thanks.
Mark