rpms/postgresql-pgpool-II/devel pgpool.init,1.1,1.2
Devrim GÜNDÜZ (devrim)
fedora-extras-commits at redhat.com
Wed Apr 9 06:37:30 UTC 2008
Author: devrim
Update of /cvs/extras/rpms/postgresql-pgpool-II/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18706
Modified Files:
pgpool.init
Log Message:
- Honor /etc/sysconfig/pgpool settings. Previously we could never
customize PGPOOLPID=/var/run/pgpool.pid et al.
- Remaining hardcoded paths replaced by customizable variables
such as $PGPOOLCONF .
Index: pgpool.init
===================================================================
RCS file: /cvs/extras/rpms/postgresql-pgpool-II/devel/pgpool.init,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pgpool.init 4 Aug 2007 22:10:30 -0000 1.1
+++ pgpool.init 9 Apr 2008 06:36:47 -0000 1.2
@@ -8,11 +8,12 @@
#
# v1.0.0 Devrim GUNDUZ <devrim at CommandPrompt.com>
# - Initial version of Red Hat / Fedora init script
-
-if [ -r /etc/sysconfig/pgpool ]; then
- . /etc/sysconfig/pgpool
-fi
-
+# v1.0.1 Devrim GUNDUZ <devrim at CommandPrompt.com>
+# - - Honor /etc/sysconfig/pgpool settings. Previously we could never
+# customize PGPOOLPID=/var/run/pgpool.pid et al.
+# - Remaining hardcoded paths replaced by customizable variables
+# such as $PGPOOLCONF .
+
# Source function library.
INITD=/etc/rc.d/init.d
. $INITD/functions
@@ -37,16 +38,21 @@
PGPOOLPID=/var/run/pgpool.pid
PGPOOLLOG=/var/log/pgpool.log
+# read in the site custom setup
+if [ -r /etc/sysconfig/pgpool ]; then
+ . /etc/sysconfig/pgpool
+fi
+
test -x $PGPOOLDAEMON || exit 5
-# Create the log file if it does not exist
+# Create the pgpool.log log file if it does not exist
if [ ! -r $PGPOOLLOG ]
then
touch $PGPOOLLOG
fi
-# Check whether the config file exists or not
-if [ ! -r /etc/pgpool.conf ]
+# Check whether the pgpool.conf config file exists or not
+if [ ! -r "$PGPOOLCONF" ]
then
echo "$PGPOOLCONF not found"
RETVAL=1
@@ -82,7 +88,7 @@
RETVAL=1
failure
else
- killproc /usr/bin/pgpool
+ killproc $PGPOOLDAEMON
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/${NAME}
fi;
More information about the fedora-extras-commits
mailing list