incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bm...@apache.org
Subject svn commit: r1354257 - /incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init
Date Tue, 26 Jun 2012 22:03:17 GMT
Author: bmahe
Date: Tue Jun 26 22:03:17 2012
New Revision: 1354257

URL: http://svn.apache.org/viewvc?rev=1354257&view=rev
Log:
BIGTOP-651. Hue init script should succeed when stopping a non running service

Modified:
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init

Modified: incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init?rev=1354257&r1=1354256&r2=1354257&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init Tue Jun 26 22:03:17
2012
@@ -66,7 +66,7 @@ hue_start() {
         # Check if already running
         if [ -e $PIDFILE ] && checkpid $(cat $PIDFILE) ; then
             echo "already running"
-            return
+            return 0
         fi
         # the supervisor itself will setuid down to $USER
         env - $DAEMON $DAEMON_OPTS
@@ -88,6 +88,11 @@ hue_start() {
 }
 
 hue_stop() {
+        if [ ! -e $PIDFILE ]; then
+            success "Hue is not running"
+            return 0
+        fi
+
         echo -n "Shutting down hue: "
         killproc -p $PIDFILE -d 15 $DAEMON
         ret=$?



Mime
View raw message