"eladmin-common/src/main/vscode:/vscode.git/clone" did not exist on "bf7c1eebf08e362b478d00d0ef399d7a16f89ffc"
Commit 3bd9510f authored by 季圣华's avatar 季圣华 Committed by Gitee
Browse files

update jshERP-boot/src/main/bin/run-manage.sh.

parent 9159f233
SERVER_NAME=jshERP SERVER_NAME=jshERP
readonly APP_HOME=${FILE_PATH:-$(dirname $(cd `dirname $0`; pwd))} readonly APP_HOME=${FILE_PATH:-$(dirname $(cd `dirname $0`; pwd))}
#readonly JAVA_HOME="" #readonly JAVA_HOME=""
readonly CONFIG_HOME="$APP_HOME/config/" readonly CONFIG_HOME="$APP_HOME/config/"
readonly LIB_HOME="$APP_HOME/lib" readonly LIB_HOME="$APP_HOME/lib"
readonly LOGS_HOME="$APP_HOME/logs" readonly LOGS_HOME="$APP_HOME/logs"
readonly PID_FILE="$LOGS_HOME/application.pid" readonly PID_FILE="$LOGS_HOME/application.pid"
readonly APP_MAIN_CLASS="jshERP3.0.jar" readonly APP_MAIN_CLASS="jshERP3.0.jar"
readonly LOG_CONFIG="$CONFIG_HOME/logback-spring.xml" readonly LOG_CONFIG="$CONFIG_HOME/logback-spring.xml"
readonly JAVA_RUN="-Dlogs.home=$LOGS_HOME -Dlogging.config=$LOG_CONFIG -Dspring.config.location=file:$CONFIG_HOME -Dspring.pid.file=$PID_FILE -Dspring.pid.fail-on-write-error=true" readonly JAVA_RUN="-Dlogs.home=$LOGS_HOME -Dlogging.config=$LOG_CONFIG -Dspring.config.location=file:$CONFIG_HOME -Dspring.pid.file=$PID_FILE -Dspring.pid.fail-on-write-error=true"
readonly JAVA_OPTS="-server -Xms128m -Xmx320m -XX:PermSize=128M -XX:MaxPermSize=256M $JAVA_RUN" readonly JAVA_OPTS="-server -Xms128m -Xmx320m -XX:PermSize=128M -XX:MaxPermSize=256M $JAVA_RUN"
readonly JAVA="java" readonly JAVA="java"
PID=0 PID=0
if [ ! -x "$LOGS_HOME" ] if [ ! -x "$LOGS_HOME" ]
then then
mkdir $LOGS_HOME mkdir $LOGS_HOME
fi fi
chmod +x -R "$JAVA_HOME/bin/" chmod +x -R "$JAVA_HOME/bin/"
functions="/etc/functions.sh" functions="/etc/functions.sh"
if test -f $functions ; then if test -f $functions ; then
. $functions . $functions
...@@ -42,7 +33,6 @@ else ...@@ -42,7 +33,6 @@ else
echo "WARNING! $@" echo "WARNING! $@"
} }
fi fi
function checkpid() { function checkpid() {
PID=$(ps -ef | grep $APP_MAIN_CLASS | grep -v 'grep' | awk '{print int($2)}') PID=$(ps -ef | grep $APP_MAIN_CLASS | grep -v 'grep' | awk '{print int($2)}')
if [[ -n "$PID" ]] if [[ -n "$PID" ]]
...@@ -52,7 +42,6 @@ function checkpid() { ...@@ -52,7 +42,6 @@ function checkpid() {
return 1 return 1
fi fi
} }
function start() { function start() {
checkpid checkpid
if [[ $? -eq 0 ]] if [[ $? -eq 0 ]]
...@@ -73,7 +62,6 @@ function start() { ...@@ -73,7 +62,6 @@ function start() {
fi fi
fi fi
} }
function stop() { function stop() {
checkpid checkpid
if [[ $? -eq 0 ]]; if [[ $? -eq 0 ]];
...@@ -91,7 +79,6 @@ function stop() { ...@@ -91,7 +79,6 @@ function stop() {
warning "[$APP_MAIN_CLASS]: is not running ..." warning "[$APP_MAIN_CLASS]: is not running ..."
fi fi
} }
function status() { function status() {
checkpid checkpid
if [[ $? -eq 0 ]] if [[ $? -eq 0 ]]
...@@ -103,7 +90,6 @@ function status() { ...@@ -103,7 +90,6 @@ function status() {
return 1 return 1
fi fi
} }
function info() { function info() {
echo "System Information:" echo "System Information:"
echo echo
...@@ -121,7 +107,6 @@ function info() { ...@@ -121,7 +107,6 @@ function info() {
echo echo
echo "****************************" echo "****************************"
} }
case "$1" in case "$1" in
'start') 'start')
start start
...@@ -143,4 +128,4 @@ case "$1" in ...@@ -143,4 +128,4 @@ case "$1" in
echo "Usage: $0 {help|start|stop|restart|status|info}" echo "Usage: $0 {help|start|stop|restart|status|info}"
;; ;;
esac esac
exit 0 exit 0
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment