Skip to content

Commit

Permalink
修复sh脚本问题 (#679)
Browse files Browse the repository at this point in the history
* 修复sh脚本问题

* 移除调试输出
  • Loading branch information
KeRan213539 committed Jan 19, 2021
1 parent 452caee commit 2177b7b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dubbo-admin-distribution/src/bin/shutdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
13 changes: 12 additions & 1 deletion dubbo-admin-distribution/src/bin/startup.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 &
Expand Down

0 comments on commit 2177b7b

Please sign in to comment.