knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject git commit: KNOX-205: Launcher script gateway sh not working when gateway installed via RPM
Date Fri, 22 Nov 2013 14:48:12 GMT
Updated Branches:
  refs/heads/master 7dec7eb44 -> 4288cfe14


KNOX-205: Launcher script gateway sh not working when gateway installed via RPM


Project: http://git-wip-us.apache.org/repos/asf/incubator-knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-knox/commit/4288cfe1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-knox/tree/4288cfe1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-knox/diff/4288cfe1

Branch: refs/heads/master
Commit: 4288cfe140fe36bcc0fa268d5bc405185eb873ad
Parents: 7dec7eb
Author: Kevin Minder <kevin.minder@hortonworks.com>
Authored: Fri Nov 22 09:48:04 2013 -0500
Committer: Kevin Minder <kevin.minder@hortonworks.com>
Committed: Fri Nov 22 09:48:04 2013 -0500

----------------------------------------------------------------------
 gateway-release/home/bin/gateway.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/4288cfe1/gateway-release/home/bin/gateway.sh
----------------------------------------------------------------------
diff --git a/gateway-release/home/bin/gateway.sh b/gateway-release/home/bin/gateway.sh
index eb58e91..2812a80 100755
--- a/gateway-release/home/bin/gateway.sh
+++ b/gateway-release/home/bin/gateway.sh
@@ -29,6 +29,9 @@ KNOX_LAUNCH_USER=$2
 # start/stop script location
 KNOX_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
+# GATEWAY_HOME
+KNOX_HOME=`dirname $KNOX_SCRIPT_DIR`
+
 #App name
 KNOX_NAME=knox
 
@@ -86,8 +89,8 @@ function knoxStart {
    
    rm -f $PID_FILE
 
-   nohup java -jar $KNOX_JAR >>$OUT_FILE 2>>$ERR_FILE & printf $!>$PID_FILE
|| exit 1
-   
+   nohup java -DGATEWAY_HOME=$KNOX_HOME -jar $KNOX_JAR >>$OUT_FILE 2>>$ERR_FILE
& printf $!>$PID_FILE || exit 1
+
    getPID
    knoxIsRunning $PID
    if [ $? -ne 1 ]; then
@@ -255,10 +258,7 @@ function setupEnv {
       exit 1
    fi
 
-   setDirPermission $PID_DIR $userName
-   setDirPermission $LOG_DIR $userName
-
-   sudo -u $userName java -jar $KNOX_JAR -persist-master -nostart
+   java -DGATEWAY_HOME=$KNOX_HOME -jar $KNOX_JAR -persist-master -nostart
 
    return 0
 }


Mime
View raw message