Fix logging, per report from Toshihiro Kitagawa.
This commit is contained in:
parent
15fd8bdf94
commit
607a37b518
2 changed files with 13 additions and 1 deletions
13
pgpool.init
13
pgpool.init
|
|
@ -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"`
|
||||
|
|
|
|||
|
|
@ -4,3 +4,4 @@
|
|||
# -d: debug mode. lots of debug information will be printed
|
||||
|
||||
#OPTS=" -d -n"
|
||||
OPTS=" -n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue