Fix logging, per report from Toshihiro Kitagawa.

This commit is contained in:
Devrim GÜNDÜZ 2009-10-22 11:59:35 +00:00
commit 607a37b518
2 changed files with 13 additions and 1 deletions

View file

@ -11,6 +11,9 @@
#
# v2.2 Devrim GUNDUZ <devrim@CommandPrompt.com>
# - New and improved version which has some fixes.
#
# v2.2.5 Devrim GUNDUZ <devrim@CommandPrompt.com>
# - Fix logging.
if [ -r /etc/sysconfig/pgpool ]; then
. /etc/sysconfig/pgpool
@ -37,6 +40,14 @@ then
NAME=${NAME:3}
fi
# For SELinux we need to use 'runuser' not 'su'
if [ -x /sbin/runuser ]
then
SU=runuser
else
SU=su
fi
# Set defaults for configuration variables
PGPOOLENGINE=/usr/bin
PGPOOLDAEMON=$PGPOOLENGINE/pgpool
@ -85,7 +96,7 @@ start(){
echo -n "$PGPOOL_START"
$PGPOOLDAEMON -f $PGPOOLCONF $OPTS & >> "$PGPOOLLOG" 2>&1 < /dev/null
$SU -l postgres -c "$PGPOOLDAEMON -f $PGPOOLCONF $OPTS & " >> "$PGPOOLLOG" 2>&1 < /dev/null
sleep 2
pid=`pidof -s "$PGPOOLDAEMON"`

View file

@ -4,3 +4,4 @@
# -d: debug mode. lots of debug information will be printed
#OPTS=" -d -n"
OPTS=" -n"