You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/07/06 13:02:29 UTC
[shardingsphere] branch master updated: add help command for proxy
start up script (#6276)
This is an automated email from the ASF dual-hosted git repository.
zhangyonglun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new f3c6b84 add help command for proxy start up script (#6276)
f3c6b84 is described below
commit f3c6b84ea274d9574602ecff63c6348c4a335e67
Author: xbkaishui <xb...@126.com>
AuthorDate: Mon Jul 6 21:02:13 2020 +0800
add help command for proxy start up script (#6276)
* add help command for proxy start up script
* add space line
* change -help to --help, fix miss docker start.sh file
---
.../src/main/resources/bin/start.bat | 18 +++++++++++++++++-
.../src/main/resources/bin/start.sh | 11 +++++++++++
.../src/main/resources/bin/start.sh | 11 +++++++++++
3 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/bin/start.bat b/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/bin/start.bat
index d73e459..c7158fc 100644
--- a/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/bin/start.bat
+++ b/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/bin/start.bat
@@ -27,6 +27,13 @@ set PORT=%1
set CONFIG=%2
+if "%PORT%"=="-h" (
+ goto print_usage
+)
+if "%PORT%"=="--help" (
+ goto print_usage
+)
+
if "%PORT%"=="" (
set MAIN_CLASS=org.apache.shardingsphere.proxy.Bootstrap
) else ( if "%CONFIG%"=="" (
@@ -46,4 +53,13 @@ echo Starting the %SERVER_NAME% ...
java -server -Xmx2g -Xms2g -Xmn1g -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Dfile.encoding=UTF-8 -classpath %CLASS_PATH% %MAIN_CLASS%
-pause
+goto exit
+
+:print_usage
+ echo "usage: start.bat [port] [config_dir]"
+ echo " port: proxy listen port, default is 3307"
+ echo " config_dir: proxy config directory, default is conf"
+ pause
+
+:exit
+ pause
diff --git a/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/bin/start.sh b/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/bin/start.sh
index bdb347d..8b4e266 100644
--- a/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/bin/start.sh
+++ b/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/bin/start.sh
@@ -38,6 +38,17 @@ JAVA_MEM_OPTS=" -server -Xmx2g -Xms2g -Xmn1g -Xss256k -XX:+DisableExplicitGC -XX
MAIN_CLASS=org.apache.shardingsphere.proxy.Bootstrap
+print_usage() {
+ echo "usage: start.sh [port] [config_dir]"
+ echo " port: proxy listen port, default is 3307"
+ echo " config_dir: proxy config directory, default is conf"
+ exit 0
+}
+
+if [ "$1" == "-h" ] || [ "$1" == "--help" ] ; then
+ print_usage
+fi
+
echo "Starting the $SERVER_NAME ..."
if [ $# == 1 ]; then
diff --git a/shardingsphere-integration-test/shardingsphere-proxy-docker-build/src/main/resources/bin/start.sh b/shardingsphere-integration-test/shardingsphere-proxy-docker-build/src/main/resources/bin/start.sh
index 21cb3a9..a574dba 100644
--- a/shardingsphere-integration-test/shardingsphere-proxy-docker-build/src/main/resources/bin/start.sh
+++ b/shardingsphere-integration-test/shardingsphere-proxy-docker-build/src/main/resources/bin/start.sh
@@ -38,6 +38,17 @@ JAVA_MEM_OPTS=" -server -Xmx2g -Xms2g -Xmn1g -Xss256k -XX:+DisableExplicitGC -XX
MAIN_CLASS=org.apache.shardingsphere.proxy.Bootstrap
+print_usage() {
+ echo "usage: start.sh [port] [config_dir]"
+ echo " port: proxy listen port, default is 3307"
+ echo " config_dir: proxy config directory, default is conf"
+ exit 0
+}
+
+if [ "$1" == "-h" ] || [ "$1" == "--help" ] ; then
+ print_usage
+fi
+
echo "Starting the $SERVER_NAME ..."
if [ $# == 1 ]; then