fusen-render/main/stop.sh

14 lines
289 B
Bash
Raw Normal View History

2023-08-16 03:42:49 +00:00
#!/bin/bash
for env in a b c; do
# 构造screen会话名
screen_name="screen_$env"
# 使用-S参数直接停止指定会话
screen -S $screen_name -X quit
# 或者使用PID停止
# screen_pid=$(screen -list | grep $screen_name | awk '{print $1}')
# kill $screen_pid
done