~ubuntu-branches/ubuntu/oneiric/pgpool2/oneiric

« back to all changes in this revision

Viewing changes to redhat/pgpool.init

  • Committer: Bazaar Package Importer
  • Author(s): Marc Gariepy
  • Date: 2010-02-17 13:58:08 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100217135808-vqxtfe80r5z8toje
Tags: 2.3.2.1-0ubuntu1
* New upstream release (2.3.2.1)
 * Lots of bug fixes
 * Add SSL support
 * Add support for large object replication
 * Enhanced replication (TIMESTAMP, DATES)
 * Save node status on restart
 * Some other minor changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
#
12
12
# v2.2 Devrim GUNDUZ <devrim@CommandPrompt.com>
13
13
# - New and improved version which has some fixes.
 
14
#
 
15
# v2.2.5 Devrim GUNDUZ <devrim@CommandPrompt.com>
 
16
# - Fix logging.
14
17
 
15
18
if [ -r /etc/sysconfig/pgpool ]; then
16
19
    . /etc/sysconfig/pgpool
37
40
        NAME=${NAME:3}
38
41
fi
39
42
 
 
43
# For SELinux we need to use 'runuser' not 'su'
 
44
if [ -x /sbin/runuser ]
 
45
then
 
46
    SU=runuser
 
47
else
 
48
    SU=su
 
49
fi
 
50
 
40
51
# Set defaults for configuration variables
41
52
PGPOOLENGINE=/usr/bin
42
53
PGPOOLDAEMON=$PGPOOLENGINE/pgpool
85
96
 
86
97
        echo -n "$PGPOOL_START"
87
98
 
88
 
        $PGPOOLDAEMON -f $PGPOOLCONF $OPTS & >> "$PGPOOLLOG" 2>&1 < /dev/null
 
99
        $SU -l postgres -c "$PGPOOLDAEMON -f $PGPOOLCONF $OPTS & " >> "$PGPOOLLOG" 2>&1 < /dev/null
89
100
        sleep 2
90
101
 
91
102
        pid=`pidof -s "$PGPOOLDAEMON"`