Repository: storm
Updated Branches:
  refs/heads/master f463a2450 -> 9081a7d0f


STORM-1618: Add the option of passing config directory


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/ede8ec24
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/ede8ec24
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/ede8ec24

Branch: refs/heads/master
Commit: ede8ec24d9091c68df08fafe8cdcae1aebfe6635
Parents: b477939
Author: Abhishek Agarwal <[email protected]>
Authored: Fri Mar 11 16:28:17 2016 +0530
Committer: Abhishek Agarwal <[email protected]>
Committed: Fri Mar 11 16:28:17 2016 +0530

----------------------------------------------------------------------
 bin/storm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/ede8ec24/bin/storm
----------------------------------------------------------------------
diff --git a/bin/storm b/bin/storm
index 0963065..e684df4 100755
--- a/bin/storm
+++ b/bin/storm
@@ -51,12 +51,15 @@ fi
 STORM_BIN_DIR=`dirname ${PRG}`
 export STORM_BASE_DIR=`cd ${STORM_BIN_DIR}/..;pwd`
 
-#check to see if the conf dir is given as an optional argument
+#check to see if the conf dir or file is given as an optional argument
 if [ $# -gt 1 ]; then
   if [ "--config" = "$1" ]; then
     conf_file=$2
+    if [ -d "$conf_file" ]; then
+      conf_file=$conf_file/storm.yaml
+    fi
     if [ ! -f "$conf_file" ]; then
-      echo "Error: Cannot find configuration directory: $conf_file"
+      echo "Error: Cannot find configuration file: $conf_file"
       exit 1
     fi
     STORM_CONF_FILE=$conf_file

Reply via email to