risdenk commented on a change in pull request #65: KNOX-1774 - Introducing 
environment variables in gateway/knoxcli/ldap/knoxshell scripts for 
customization
URL: https://github.com/apache/knox/pull/65#discussion_r263926705
 
 

 ##########
 File path: gateway-release/home/bin/ldap.sh
 ##########
 @@ -17,44 +17,43 @@
 #  limitations under the License.
 #
 
-# App name
+# The app's label
 APP_LABEL=LDAP
 
-# App name
+# The app's name
 APP_NAME=ldap
 
-# App name
-APP_JAR_NAME=ldap.jar
-
 # start/stop script location
 APP_BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
+# The app's JAR name
+APP_JAR="$APP_BIN_DIR/ldap.jar"
+
 # Setup the common environment
 . $APP_BIN_DIR/knox-env.sh
 
-# The app's jar name
-APP_JAR="$APP_BIN_DIR/$APP_JAR_NAME"
+# Source common functions
+. $APP_BIN_DIR/knox-functions.sh
 
 # The app's home dir
 APP_HOME_DIR=`dirname $APP_BIN_DIR`
 
-# The apps home dir
-APP_CONF_DIR="$APP_HOME_DIR/conf"
+# The app's conf dir
+DEFAULT_APP_CONF_DIR="$APP_HOME_DIR/conf"
+APP_CONF_DIR=${KNOX_LDAP_CONF_DIR:-$DEFAULT_APP_CONF_DIR}
 
 # The app's log dir
-APP_LOG_DIR="$APP_HOME_DIR/logs"
+DEFAULT_APP_LOG_DIR="$APP_HOME_DIR/logs"
+APP_LOG_DIR=${KNOX_LDAP_LOG_DIR:-$DEFAULT_APP_LOG_DIR}
 
-# The app's Log4j options
-APP_LOG_OPTS=""
+# The app's logging options
+APP_LOG_OPTS="$KNOX_LDAP_LOG_OPTS"
 
 # The app's memory options
-APP_MEM_OPTS=""
+APP_MEM_OPTS="$KNOX_LDAP_MEM_OPTS"
 
 # The app's debugging options
-APP_DBG_OPTS=""
-
-# Start, stop, status, clean
-APP_LAUNCH_COMMAND=$1
+APP_DBG_OPTS="$KNOX_LDAP_DBG_OPTS"
 
 # The app's PID
 APP_PID=0
 
 Review comment:
   I think `APP_PID_DIR` was not updated here like it was in `gateway.sh`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to