diff --git a/piflow-bin/README.txt b/piflow-bin/README.txt index 419f143..6f48407 100644 --- a/piflow-bin/README.txt +++ b/piflow-bin/README.txt @@ -1,4 +1,4 @@ -1.build piflow-server-0.9.jar, copy it to folder --- lib +1.build piflow-server-0.9.jar, copy it to folder --- ./lib 2.set PIFLOW_HOME vim /etc/profile diff --git a/piflow-bin/start.sh b/piflow-bin/start.sh index d91c4ea..b201d92 100755 --- a/piflow-bin/start.sh +++ b/piflow-bin/start.sh @@ -2,5 +2,5 @@ #java -cp piflow-server-0.9.jar:./classpath/piflow-external.jar cn.piflow.api.Main #java -cp piflow-server-0.9.jar:./classpath/* cn.piflow.api.Main nohup java -cp ./lib/piflow-server-0.9.jar:./classpath/* cn.piflow.api.Main > ./logs/piflow.log 2>&1 & -echo "check log in piflow.log" +echo "check log in logs/piflow.log" diff --git a/piflow-bin/status.sh b/piflow-bin/status.sh new file mode 100755 index 0000000..dd7f3a4 --- /dev/null +++ b/piflow-bin/status.sh @@ -0,0 +1,18 @@ +#!/bin/bash +#ps term +function check_status() +{ + [ ${#} -eq 0 ] && echo "usage: $FUNCNAME STRING" && return 0 + local pid + pid=$(ps ax | grep "$1" | grep -v grep | awk '{ print $1 }') + if [ $pid != "" ] + then + echo "server is Running!" + port=$(netstat -nltp | grep $pid | awk '{print $4}') + echo "$port" + else + echo "Server is Stopped!" + fi +} + +check_status piflow.api.Main