Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
saysky authored Jun 14, 2024
1 parent 86a7061 commit 8cc4585
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/sens.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ usage() {
}

is_exist(){
pid=`ps -ef|grep $APP_NAME|grep -v grep|awk '{print $2}' `
pid=`ps -ef|grep APP_NAME|grep -v grep|awk '{printAPP_NAME|grep -v grep|awk '{print 2}' `
if [ -z "${pid}" ]; then
return 1
else
Expand All @@ -18,7 +18,7 @@ is_exist(){
start(){
is_exist
if [ $? -eq "0" ]; then
echo "${APP_NAME} 正在运行。 pid=${pid} ."
echo "APPNAME正在运行。pid={APP_NAME} 正在运行。 pid={pid} ."
else
nohup java -server -Xms1024m -Xmx1024m -Xmn340m -Xloggc:/www/wwwroot/sens-gc.log -jar $APP_NAME --server.port=80 > /dev/null 2>&1 &
Expand All @@ -39,7 +39,7 @@ stop(){
status(){
is_exist
if [ $? -eq "0" ]; then
echo "${APP_NAME} 正在运行。Pid is ${pid}"
echo "APPNAME正在运行。Pidis{APP_NAME} 正在运行。Pid is {pid}"
else
echo "${APP_NAME} 没有运行。"
fi
Expand Down Expand Up @@ -67,3 +67,4 @@ case "$1" in
usage
;;
esac

0 comments on commit 8cc4585

Please sign in to comment.