incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bm...@apache.org
Subject svn commit: r1308645 - /incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init
Date Tue, 03 Apr 2012 01:34:19 GMT
Author: bmahe
Date: Tue Apr  3 01:34:19 2012
New Revision: 1308645

URL: http://svn.apache.org/viewvc?rev=1308645&view=rev
Log:
BIGTOP-506. Flume should exit 0 when trying to start an already running service

Modified:
    incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init?rev=1308645&r1=1308644&r2=1308645&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init Tue Apr  3 01:34:19
2012
@@ -67,6 +67,13 @@ FLUME_NODE_NAME=${FLUME_NODE_NAME:-${DEF
 
 start() {
   [ -x $exec ] || exit $ERROR_PROGRAM_NOT_INSTALLED
+
+  checkstatus
+  status=$?
+  if [ "$status" -eq "$STATUS_RUNNING" ]; then
+    exit 0
+  fi
+
   log_success_msg "Starting $desc (flume-node): "
   /bin/su -s /bin/bash -c "/bin/bash -c 'echo \$\$ > ${FLUME_PID_FILE} && exec
${EXEC_PATH} node --conf $FLUME_CONF_DIR --conf-file $FLUME_CONF_FILE --name $FLUME_NODE_NAME
&>>${FLUME_LOG_DIR}/flume-node.log' &" $USER
   RETVAL=$?



Mime
View raw message