You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by il...@apache.org on 2021/01/19 05:18:24 UTC
[dubbo-admin] branch develop updated: 修复sh脚本问题 (#679)
This is an automated email from the ASF dual-hosted git repository.
iluo pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git
The following commit(s) were added to refs/heads/develop by this push:
new 2177b7b 修复sh脚本问题 (#679)
2177b7b is described below
commit 2177b7be999ccb5dbd39da47a27516f3dd669da9
Author: 邪影oO <21...@qq.com>
AuthorDate: Tue Jan 19 13:18:18 2021 +0800
修复sh脚本问题 (#679)
* 修复sh脚本问题
* 移除调试输出
---
dubbo-admin-distribution/src/bin/shutdown.sh | 2 +-
dubbo-admin-distribution/src/bin/startup.sh | 13 ++++++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dubbo-admin-distribution/src/bin/shutdown.sh b/dubbo-admin-distribution/src/bin/shutdown.sh
index 67059bd..b0f6c5a 100644
--- a/dubbo-admin-distribution/src/bin/shutdown.sh
+++ b/dubbo-admin-distribution/src/bin/shutdown.sh
@@ -28,4 +28,4 @@ echo "The dubbo admin server(${pid}) is running..."
kill ${pid}
-echo "Send shutdown request to dubbo admin server(${pid}) OK"
+echo "Send shutdown request to dubbo admin server(${pid}) OK!"
diff --git a/dubbo-admin-distribution/src/bin/startup.sh b/dubbo-admin-distribution/src/bin/startup.sh
index f152dbb..765f814 100644
--- a/dubbo-admin-distribution/src/bin/startup.sh
+++ b/dubbo-admin-distribution/src/bin/startup.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -47,10 +47,21 @@ if [ -z "$JAVA_HOME" ]; then
error_exit "Please set the JAVA_HOME variable in your environment, We need java(x64)! jdk8 or later is better!"
fi
fi
+
export SERVER="dubbo-admin"
export JAVA_HOME
export JAVA="$JAVA_HOME/bin/java"
export BASE_DIR=`cd $(dirname $0)/..; pwd`
+
+if [ ! -d "${BASE_DIR}/logs" ]; then
+ mkdir ${BASE_DIR}/logs
+fi
+
+# check the start.out log output file
+if [ ! -f "${BASE_DIR}/logs/start.out" ]; then
+ touch "${BASE_DIR}/logs/start.out"
+fi
+
JAVA_OPT="${JAVA_OPT} -Xms512m -Xmx512m -Xmn256m"
JAVA_OPT="${JAVA_OPT} -jar ${BASE_DIR}/lib/${SERVER}.jar"
nohup $JAVA ${JAVA_OPT} dubbo.admin >> ${BASE_DIR}/logs/catlog.out 2>&1 &