You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by mo...@apache.org on 2017/02/21 22:34:21 UTC

knox git commit: KNOX-868 - Add /ext/native to java.library.path in gateway.sh (Mohammad Kamrul Islam via Sandeep More)

Repository: knox
Updated Branches:
  refs/heads/master c23759ae2 -> c346ee379


KNOX-868 - Add /ext/native to java.library.path in gateway.sh (Mohammad Kamrul Islam via Sandeep More)


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

Branch: refs/heads/master
Commit: c346ee3798d84eb862cabda2d95d6409d7b4da0f
Parents: c23759a
Author: Sandeep More <mo...@apache.org>
Authored: Tue Feb 21 17:34:11 2017 -0500
Committer: Sandeep More <mo...@apache.org>
Committed: Tue Feb 21 17:34:11 2017 -0500

----------------------------------------------------------------------
 gateway-release/home/bin/gateway.sh    | 7 +++++--
 gateway-release/home/ext/native/README | 1 +
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/c346ee37/gateway-release/home/bin/gateway.sh
----------------------------------------------------------------------
diff --git a/gateway-release/home/bin/gateway.sh b/gateway-release/home/bin/gateway.sh
index 02c0b15..5f9b8df 100755
--- a/gateway-release/home/bin/gateway.sh
+++ b/gateway-release/home/bin/gateway.sh
@@ -56,6 +56,9 @@ APP_DBG_OPTS=""
 # The app's PID
 APP_PID=0
 
+#dynamic library path
+APP_JAVA_LIB_PATH="-Djava.library.path=$APP_HOME_DIR/ext/native"
+
 # Start, stop, status, clean or setup
 APP_LAUNCH_CMD=$1
 
@@ -109,7 +112,7 @@ function appStart {
    checkEnv
 
    if [ "$GATEWAY_SERVER_RUN_IN_FOREGROUND" == true ]; then
-      $JAVA $APP_MEM_OPTS $APP_DBG_OPTS $APP_LOG_OPTS -jar $APP_JAR >>$APP_OUT_FILE 2>>$APP_ERR_FILE
+      $JAVA $APP_JAVA_LIB_PATH $APP_MEM_OPTS $APP_DBG_OPTS $APP_LOG_OPTS -jar $APP_JAR >>$APP_OUT_FILE 2>>$APP_ERR_FILE
    else
       getPID
       if [ "$?" -eq "0" ]; then
@@ -121,7 +124,7 @@ function appStart {
    
       rm -f $APP_PID_FILE
 
-      nohup $JAVA $APP_MEM_OPTS $APP_DBG_OPTS $APP_LOG_OPTS -jar $APP_JAR >>$APP_OUT_FILE 2>>$APP_ERR_FILE & printf $!>$APP_PID_FILE || exit 1
+      nohup $JAVA $APP_JAVA_LIB_PATH $APP_MEM_OPTS $APP_DBG_OPTS $APP_LOG_OPTS -jar $APP_JAR >>$APP_OUT_FILE 2>>$APP_ERR_FILE & printf $!>$APP_PID_FILE || exit 1
 
       getPID
       for ((i=0; i<APP_START_WAIT_TIME*10; i++)); do

http://git-wip-us.apache.org/repos/asf/knox/blob/c346ee37/gateway-release/home/ext/native/README
----------------------------------------------------------------------
diff --git a/gateway-release/home/ext/native/README b/gateway-release/home/ext/native/README
new file mode 100644
index 0000000..eab1769
--- /dev/null
+++ b/gateway-release/home/ext/native/README
@@ -0,0 +1 @@
+THIS DIRECTORY IS WHERE DYNAMIC LIBRARIES (e.g. *.so) CONTAINING CUSTOM EXTENSIONS CAN BE PLACED