Author: sardzent                     Date: Mon Jun 16 07:30:53 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- added force stop

---- Files affected:
SOURCES:
   pgpool.init (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/pgpool.init
diff -u SOURCES/pgpool.init:1.1 SOURCES/pgpool.init:1.2
--- SOURCES/pgpool.init:1.1     Fri Jun 13 23:14:14 2008
+++ SOURCES/pgpool.init Mon Jun 16 09:30:47 2008
@@ -64,7 +64,6 @@
                msg_stopping pgpool
                busy
                /usr/bin/pgpool stop >> $PGPOOLLOG 2>&1
-#              killproc --waitforname pgpool --waitfortime 60 pgpool
                if [ $? -eq 0 ]; then
                        rm -f /var/lock/subsys/pgpool /var/run/pgpool.pid 
>/dev/null 2>&1
                        ok
@@ -76,6 +75,23 @@
        fi
 }
 
+force-stop() {
+       # Stop daemons (don't wait)
+       if [ -f /var/lock/subsys/pgpool ]; then
+               msg_stopping pgpool
+               busy
+               /usr/bin/pgpool -m fast stop >> $PGPOOLLOG 2>&1
+               if [ $? -eq 0 ]; then
+                       rm -f /var/lock/subsys/pgpool /var/run/pgpool.pid 
>/dev/null 2>&1
+                       ok
+               else
+                       fail
+               fi
+       else
+               msg_not_running pgpool
+       fi      
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -103,8 +119,12 @@
                RETVAL=7
        fi
        ;;
+  reload)
+       force-stop
+       start
+       ;;
   *)
-       msg_usage "$0 {start|stop|restart|switch|status}"
+       msg_usage "$0 {start|stop|restart|reload|switch|status}"
        exit 3
        ;;
 esac
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/pgpool.init?r1=1.1&r2=1.2&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to