diff --git a/proxyserver/.gitignore b/proxyserver/.gitignore new file mode 100644 index 00000000..08df2478 --- /dev/null +++ b/proxyserver/.gitignore @@ -0,0 +1,2 @@ +main +proxyserver \ No newline at end of file diff --git a/run_all_server.sh b/run_all_server.sh index db1b5972..b9172a22 100755 --- a/run_all_server.sh +++ b/run_all_server.sh @@ -40,7 +40,7 @@ done # 在每个服务器目录下运行相应的 go 程序 for server_dir in "${server_dirs[@]}"; do - run_server $server_dir + run_server $server_dir & done # 定义目录和screen名称 @@ -49,12 +49,11 @@ screen_name="proxyserver" # 进入目录 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 go run main.go \ No newline at end of file +screen -dmS $screen_name -L ./$screen_name \ No newline at end of file