From ac3c3bb4d5b18329aa48d4663ca8eda9420f2b83 Mon Sep 17 00:00:00 2001 From: joewitt Date: Wed, 24 Dec 2014 22:12:09 -0500 Subject: [PATCH] NIFI-200 added quotes around appropriate path to allow space to work and ensured nifi root was set properly/tested on paths with spaces and without --- .../resources/src/main/resources/bin/nifi-status.bat | 7 ++++--- .../resources/src/main/resources/bin/run-nifi.bat | 7 ++++--- .../resources/src/main/resources/bin/start-nifi.bat | 8 ++++---- .../resources/src/main/resources/bin/stop-nifi.bat | 7 ++++--- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi-status.bat b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi-status.bat index d00f31cf55..07dd6c71c3 100644 --- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi-status.bat +++ b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi-status.bat @@ -1,5 +1,4 @@ @echo off - rem rem Licensed to the Apache Software Foundation (ASF) under one or more rem contributor license agreements. See the NOTICE file distributed with @@ -20,8 +19,10 @@ rem rem Use JAVA_HOME if it's set; otherwise, just use java IF "%JAVA_HOME%"=="" (SET JAVA_EXE=java) ELSE (SET JAVA_EXE=%JAVA_HOME%\bin\java.exe) -SET LIB_DIR=%~dp0..\lib\bootstrap -SET CONF_DIR=%~dp0..\conf +SET NIFI_ROOT=%~dp0..\ +CD /d "%NIFI_ROOT%" +SET LIB_DIR=lib\bootstrap +SET CONF_DIR=conf SET BOOTSTRAP_CONF_FILE=%CONF_DIR%\bootstrap.conf SET JAVA_ARGS=-Dorg.apache.nifi.bootstrap.config.file=%BOOTSTRAP_CONF_FILE% diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/run-nifi.bat b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/run-nifi.bat index 5bab3886b1..03123d6b43 100644 --- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/run-nifi.bat +++ b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/run-nifi.bat @@ -16,12 +16,13 @@ rem See the License for the specific language governing permissions and rem limitations under the License. rem - rem Use JAVA_HOME if it's set; otherwise, just use java IF "%JAVA_HOME%"=="" (SET JAVA_EXE=java) ELSE (SET JAVA_EXE=%JAVA_HOME%\bin\java.exe) -SET LIB_DIR=%~dp0..\lib\bootstrap -SET CONF_DIR=%~dp0..\conf +SET NIFI_ROOT=%~dp0..\ +CD /d "%NIFI_ROOT%" +SET LIB_DIR=lib\bootstrap +SET CONF_DIR=conf SET BOOTSTRAP_CONF_FILE=%CONF_DIR%\bootstrap.conf SET JAVA_ARGS=-Dorg.apache.nifi.bootstrap.config.file=%BOOTSTRAP_CONF_FILE% diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/start-nifi.bat b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/start-nifi.bat index 882b719c29..6cc873342f 100644 --- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/start-nifi.bat +++ b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/start-nifi.bat @@ -1,5 +1,4 @@ @echo off - rem rem Licensed to the Apache Software Foundation (ASF) under one or more rem contributor license agreements. See the NOTICE file distributed with @@ -17,12 +16,13 @@ rem See the License for the specific language governing permissions and rem limitations under the License. rem - rem Use JAVA_HOME if it's set; otherwise, just use java IF "%JAVA_HOME%"=="" (SET JAVA_EXE=java) ELSE (SET JAVA_EXE=%JAVA_HOME%\bin\java.exe) -SET LIB_DIR=%~dp0..\lib\bootstrap -SET CONF_DIR=%~dp0..\conf +SET NIFI_ROOT=%~dp0..\ +CD /d "%NIFI_ROOT%" +SET LIB_DIR=lib\bootstrap +SET CONF_DIR=conf SET BOOTSTRAP_CONF_FILE=%CONF_DIR%\bootstrap.conf SET JAVA_ARGS=-Dorg.apache.nifi.bootstrap.config.file=%BOOTSTRAP_CONF_FILE% diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/stop-nifi.bat b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/stop-nifi.bat index 40c2d57b45..e4fc81d200 100644 --- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/stop-nifi.bat +++ b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/stop-nifi.bat @@ -1,5 +1,4 @@ @echo off - rem rem Licensed to the Apache Software Foundation (ASF) under one or more rem contributor license agreements. See the NOTICE file distributed with @@ -20,8 +19,10 @@ rem rem Use JAVA_HOME if it's set; otherwise, just use java IF "%JAVA_HOME%"=="" (SET JAVA_EXE=java) ELSE (SET JAVA_EXE=%JAVA_HOME%\bin\java.exe) -SET LIB_DIR=%~dp0..\lib\bootstrap -SET CONF_DIR=%~dp0..\conf +SET NIFI_ROOT=%~dp0..\ +CD /d "%NIFI_ROOT%" +SET LIB_DIR=lib\bootstrap +SET CONF_DIR=conf SET BOOTSTRAP_CONF_FILE=%CONF_DIR%\bootstrap.conf SET JAVA_ARGS=-Dorg.apache.nifi.bootstrap.config.file=%BOOTSTRAP_CONF_FILE%