🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## code <details> <summary>uporgserver_guard </summary> ``` #!/bin/bash cd $(dirname ${0}) while [ 2 -ge 1 ]; do ./uporgserver_starter > /dev/null 2>&1 sleep 30 done exit 0 ``` </details> <br/> <details> <summary>uporgserver_starter</summary> ``` #!/bin/bash cd $(dirname ${0}) APP_NAME="UpOrgServer" if [[ $(ps -ef | grep -v 'grep' | grep "$APP_NAME" |wc -l) -ge 1 ]]; then echo "${APP_NAME} is already running." else nohup ./${APP_NAME} > /dev/null 2>&1 & echo "${APP_NAME} is starting ..." sleep 1 fi exit 0 ``` </details> <br/>