This commit is contained in:
eson 2023-09-22 00:22:53 +08:00
parent 6260d29dc7
commit e6470719bb

View File

@ -51,17 +51,22 @@ for server_dir in "${server_dirs[@]}"; do
done
# 定义目录和screen名称
dir_path="./proxyserver"
screen_name="proxyserver"
if [ -n "$single_server_name" ]; then
echo "no proxyserver restart"
else
# 定义目录和screen名称
dir_path="./proxyserver"
screen_name="proxyserver"
# 进入目录
cd $dir_path
# 检查是否存在screen session
if screen -list | grep -q "$screen_name"; then
# 进入目录
cd $dir_path
# 检查是否存在screen session
if screen -list | grep -q "$screen_name"; then
# 结束存在的screen session
screen -S $screen_name -X quit
fi
go build
# 启动新的screen session并运行go程序
screen -dmS $screen_name -L ./$screen_name
fi
go build
# 启动新的screen session并运行go程序
screen -dmS $screen_name -L ./$screen_name