add shell
parent
bd49cc17db
commit
9ce68fed9b
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
cd `dirname $0`
|
||||
./stop.sh
|
||||
./start.sh
|
@ -0,0 +1,22 @@
|
||||
@echo off & setlocal enabledelayedexpansion
|
||||
|
||||
set LIB_JARS=""
|
||||
cd ..\lib
|
||||
for %%i in (*) do set LIB_JARS=!LIB_JARS!;..\lib\%%i
|
||||
cd ..\bin
|
||||
|
||||
if ""%1"" == ""debug"" goto debug
|
||||
if ""%1"" == ""jmx"" goto jmx
|
||||
|
||||
java -Xms64m -Xmx1024m -XX:MaxPermSize=64M -classpath ..\conf;%LIB_JARS% com.alibaba.dubbo.container.Main
|
||||
goto end
|
||||
|
||||
:debug
|
||||
java -Xms64m -Xmx1024m -XX:MaxPermSize=64M -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -classpath ..\conf;%LIB_JARS% com.alibaba.dubbo.container.Main
|
||||
goto end
|
||||
|
||||
:jmx
|
||||
java -Xms64m -Xmx1024m -XX:MaxPermSize=64M -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -classpath ..\conf;%LIB_JARS% com.alibaba.dubbo.container.Main
|
||||
|
||||
:end
|
||||
pause
|
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
cd `dirname $0`
|
||||
BIN_DIR=`pwd` #安装目录
|
||||
cd ..
|
||||
DEPLOY_DIR=`pwd`
|
||||
LIB_DIR=$DEPLOY_DIR/lib/ #jar目录
|
||||
CONF_DIR=$DEPLOY_DIR/conf #conf目录
|
||||
LOGS_DIR=$DEPLOY_DIR/logs #log目录
|
||||
|
||||
LIB_JARS=`ls $LIB_DIR|grep .jar|awk '{print "'$LIB_DIR'/"$0}'|tr "\n" ":"`
|
||||
|
||||
JAVA_OPTS=" -server -Xmx2g -Xms2g -Xmn256m -XX:PermSize=128m -Xss256k "
|
||||
|
||||
echo "$DEPLOY_DIR"
|
||||
echo "$LIB_JARS"
|
||||
|
||||
|
||||
PIDS=`ps -f | grep java | grep "report-core" |awk '{print $2}'`
|
||||
if [ -n "$PIDS" ]; then
|
||||
echo "ERROR: The AJ-Report already started!"
|
||||
echo "PID: $PIDS"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
nohup java -Xbootclasspath/a:$LIB_DIR $JAVA_OPTS -jar -Dspring.config.location=$CONF_DIR/bootstrap-dev.yml $LIB_DIR/report-core-1.0.0-SNAPSHOT.jar >/dev/null 2>&1 &
|
||||
#nohup java $JAVA_OPTS -jar -Dspring.config.location=$CONF_DIR/bootstrap-dev.yml $LIB_DIR/report-core-1.0.0-SNAPSHOT.jar -classpath $LIB_JARS >/dev/null 2>&1 &
|
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
pid=`ps ax | grep -i 'report-core' | grep java | grep -v grep | awk '{print $1}'`
|
||||
if [ -z "$pid" ] ; then
|
||||
echo "No AJ-Report Server running."
|
||||
exit -1;
|
||||
fi
|
||||
|
||||
|
||||
kill -9 ${pid}
|
||||
|
||||
echo "Send shutdown request to report-core(${pid}) OK"
|
Loading…
Reference in New Issue