#!/bin/sh#JAVA_DEBUG='-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000'script_abs=$(readlink -f "$0")script_dir=$(dirname $script_abs)root_dir=$(cd $script_dir/../;pwd)echo"root dir is $root_dir"logs_dir=$root_dir/logs
echo"logs dir is $logs_dir"if[! -d "$logs_dir"];thenecho"logs dir not exist,create logs dir $logs_dir"mkdir$logs_dirficd$root_dirif[ -f '/home/aaa/bbb/ccc/jdk/jre/bin/java']thenJAVA_EXE='/home/aaa/bbb/ccc/jdk/jre/bin/java'fiecho$JAVA_EXEif[ -z $JAVA_EXE]thenJAVA_EXE=$(which java)fiecho$JAVA_EXEif[ -z $JAVA_EXE]thenecho'can not found java'exit1ficd$root_dirnohup$JAVA_EXE$JAVA_DEBUG\
-Dfile.encoding=UTF-8 -cp lib/*:config:aaa-1.0.jar aaa.bbb.ccc.AppMain >>$logs_dir/app.log 2>&1&echo$!>$script_dir/pidfile.txt
startup.sh#!/bin/sh#JAVA_DEBUG='-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000'script_abs=$(readlink -f "$0")script_dir=$(dirname $script_abs)root_dir=$(cd $script_dir/../;pwd)echo "root dir is $root_dir"logs_dir=$root_dir/lo