[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] SF.net SVN: squirrelmail:[14100]
From:       pdontthink () users ! sourceforge ! net
Date:       2011-04-18 0:02:11
Message-ID: E1QBbut-0002P9-Fu () sfp-svn-1 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 14100
          http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=14100&view=rev
Author:   pdontthink
Date:     2011-04-18 00:02:11 +0000 (Mon, 18 Apr 2011)

Log Message:
-----------
Add restart operation

Modified Paths:
--------------
    trunk/imap_proxy/scripts/imapproxy.init

Modified: trunk/imap_proxy/scripts/imapproxy.init
===================================================================
--- trunk/imap_proxy/scripts/imapproxy.init	2011-04-17 23:13:14 UTC (rev 14099)
+++ trunk/imap_proxy/scripts/imapproxy.init	2011-04-18 00:02:11 UTC (rev 14100)
@@ -38,7 +38,7 @@
 # Init file for squirrelmail-imap_proxy server daemon
 #
 # chkconfig: 2345 99 10
-# description:  Imapproxy Daemon 
+# description:  IMAP Proxy Daemon 
 #
 # processname: in.imapproxyd
 # config: /etc/imapproxy.conf
@@ -46,35 +46,53 @@
 Pgm=`/bin/basename $0`
 PROXY_BIN=/usr/local/sbin/in.imapproxyd
 
-case $1 in
 
-    'start')
+start() {
 
-	# make sure the executable exists.
+    # make sure the executable exists.
 
-	if [ ! -f $PROXY_BIN ]; then
-	    /bin/echo "$Pgm: $PROXY_BIN does not exist.  Not starting IMAP proxy server." \
                1>&2
-	    exit 1
-	fi
+    if [ ! -f $PROXY_BIN ]; then
+	/bin/echo "$Pgm: $PROXY_BIN does not exist.  Not starting IMAP proxy server." 1>&2
+	exit 1
+    fi
 
-	/bin/echo "$Pgm: Starting IMAP proxy server." 1>&2
+    /bin/echo "$Pgm: Starting IMAP proxy server." 1>&2
 
-	$PROXY_BIN
+    $PROXY_BIN
+
+}
+
+
+stop() {
+
+    /bin/echo "$Pgm: Shutting down IMAP proxy server." 1>&2
+
+    pkill -x in.imapproxyd
+
+}
+
+
+case $1 in
+
+    'start')
+	start
 	;;
 
 
 
     'stop')
+	stop
+	;;
 
-	/bin/echo "$Pgm: Shutting down IMAP proxy server." 1>&2
 
-	pkill -x in.imapproxyd
+    'restart')
+        stop
+        start
+        ;;
 
-	;;
 
-
     *)
-	/bin/echo "usage: $Pgm {start|stop}" 1>&2
+	/bin/echo "usage: $Pgm {start|stop|restart}" 1>&2
 
 	exit 0
 


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
-----
squirrelmail-cvs mailing list
List address: squirrelmail-cvs@lists.sourceforge.net
List info (subscribe/unsubscribe/change options): \
                https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
Repository: http://squirrelmail.org/svn


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic