Commit ff07d9d5 authored by 季圣华's avatar 季圣华
Browse files

完善启动文件

parent deae53f0
FILE_PATH=
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))}
...@@ -44,19 +43,6 @@ else ...@@ -44,19 +43,6 @@ else
} }
fi fi
function install(){
if [[ ! -n $FILE_PATH ]];then
sed -i "s#FILE_PATH=/home/jshERP2.0#FILE_PATH=$APP_HOME#" $APP_HOME/$0
if [[ -e /usr/sbin/$SERVER_NAME || -L /usr/sbin/$SERVER_NAME ]];then
rm -rf /usr/sbin/$SERVER_NAME && ln -s $APP_HOME/$0 /usr/sbin/$SERVER_NAME
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" ]]
...@@ -153,11 +139,8 @@ case "$1" in ...@@ -153,11 +139,8 @@ case "$1" in
'info') 'info')
info info
;; ;;
'install')
install
;;
*) *)
echo "Usage: $0 {help|start|stop|restart|status|info|install}" echo "Usage: $0 {help|start|stop|restart|status|info}"
;; ;;
esac esac
exit 0 exit 0
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