smolnar82 opened a new pull request, #891: URL: https://github.com/apache/knox/pull/891
## What changes were proposed in this pull request? I updated the existing login in `knox-functions.sh` to successfully check Java executables under `/usr` if no `JAVA_HOME` is set or Java is not available on the path. In addition to fixing the issue, I added an option to display the Java with the `--verbose` option (when using KnoxCLI, `--verbose true` should be used. ## How was this patch tested? Checked the updated scripts on [shellcheck.net](https://www.shellcheck.net/) and tested them manually: - `gateway.sh` ``` $ bin/gateway.sh restart --verbose Found Java at /usr/local/opt/openjdk@8/bin/java Stopping Gateway with PID 12173 succeeded. Starting Gateway succeeded with PID 12346. $ bin/gateway.sh restart Stopping Gateway with PID 12346 succeeded. Starting Gateway succeeded with PID 12419. ``` - `knoxcli.sh` ``` $ bin/knoxcli.sh export-cert --type JKS --verbose true Found Java at /usr/local/opt/openjdk@8/bin/java Certificate gateway-identity has been successfully exported to: /Users/sandormolnar/test/knoxGateway/data/security/keystores/gateway-client-trust.jks $ bin/knoxcli.sh export-cert --type JKS Certificate gateway-identity has been successfully exported to: /Users/sandormolnar/test/knoxGateway/data/security/keystores/gateway-client-trust.jks ``` - `ldap.sh` ``` $ bin/ldap.sh start --verbose Found Java at /usr/local/opt/openjdk@8/bin/java Starting LDAP succeeded with PID 12531. $ bin/ldap.sh stop Stopping LDAP with PID 12531 succeeded. $ bin/ldap.sh start Starting LDAP succeeded with PID 12573. ``` -- 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. To unsubscribe, e-mail: dev-unsubscr...@knox.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org