ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` #!/bin/bash HOME_LISTEN=/app/listen cp_listen(){ echo "==========开始复制==========" rm -rf $HOME_LISTEN/listener-reader_8592/webapps/listen* rm -rf $HOME_LISTEN/listener-reader_8597/webapps/listen* rm -rf $HOME_LISTEN/listener-processor_8593/listen* rm -rf $HOME_LISTEN/listener-processor_8594/webapps/listen* rm -rf $HOME_LISTEN/listener-processor_8598/webapps/listen* rm -rf $HOME_LISTEN/listener-console/webapps/listen* cp -f $HOME_LISTEN/war-package/listener-reader.war $HOME_LISTEN/listener-reader_8592/webapps/ cp -f $HOME_LISTEN/war-package/listener-reader.war $HOME_LISTEN/listener-reader_8597/webapps/ cp -f $HOME_LISTEN/war-package/listener-processor.war $HOME_LISTEN/listener-processor_8593/webapps/ cp -f $HOME_LISTEN/war-package/listener-processor.war $HOME_LISTEN/listener-processor_8594/webapps/ cp -f $HOME_LISTEN/war-package/listener-processor.war $HOME_LISTEN/listener-processor_8598/webapps/ cp -f $HOME_LISTEN/war-package/listener-console.war $HOME_LISTEN/listener-console/webapps/ echo "==========复制完成==========" } stop_listen() { echo "==========停止应用==========" test `netstat -tunlp |grep 8585 | wc -l` -eq 1 && $HOME_LISTEN/listener-console/bin/shutdown.sh test `netstat -tunlp |grep 8594 | wc -l` -eq 1 && $HOME_LISTEN/listener-processor_8594/bin/shutdown.sh test `netstat -tunlp |grep 8593 | wc -l` -eq 1 && $HOME_LISTEN/listener-processor_8593/bin/shutdown.sh test `netstat -tunlp |grep 8598 | wc -l` -eq 1 && $HOME_LISTEN/listener-processor_8598/bin/shutdown.sh test `netstat -tunlp |grep 8592 | wc -l` -eq 1 && $HOME_LISTEN/listener-reader_8592/bin/shutdown.sh test `netstat -tunlp |grep 8597 | wc -l` -eq 1 && $HOME_LISTEN/listener-reader_8597/bin/shutdown.sh sleep 1 echo "==========应用已停止==========" } start_listen() { echo "==========启动应用==========" sleep 2 $HOME_LISTEN/listener-console/bin/startup.sh && \ $HOME_LISTEN/listener-processor_8594/bin/startup.sh && \ $HOME_LISTEN/listener-processor_8593/bin/startup.sh && \ $HOME_LISTEN/listener-processor_8598/bin/startup.sh && \ $HOME_LISTEN/listener-reader_8592/bin/startup.sh && \ $HOME_LISTEN/listener-reader_8597/bin/startup.sh echo "==========应用启动完成==========" } clean() { netstat -tunlp|grep -E '85[85|92|93|94|97|98]'| awk '{print $7}'| awk -F "/" '{print $1}' | xargs kill -9 } case $1 in restart) stop_listen clean start_listen ;; stop) stop_listen clean ;; start) start_listen ;; auto) stop_listen clean cp_listen start_listen ;; *) echo "$0 restart|stop|start|auto" ;; esac ```