修改配置
This commit is contained in:
@@ -185,7 +185,8 @@ start_svc() {
|
||||
|
||||
# ── 停止单个后端服务 ────────────────────────────────────────────────────────────
|
||||
stop_svc() {
|
||||
local name="$1" pidfile="$PID_DIR/$name.pid"
|
||||
local name="$1"
|
||||
local pidfile="$PID_DIR/$name.pid"
|
||||
if [[ -f "$pidfile" ]]; then
|
||||
local pid; pid=$(cat "$pidfile")
|
||||
if kill -0 "$pid" 2>/dev/null; then
|
||||
@@ -213,7 +214,8 @@ print_container_status() {
|
||||
|
||||
# ── 后端服务状态打印 ────────────────────────────────────────────────────────────
|
||||
print_svc_status() {
|
||||
local name="$1" desc="$2" pidfile="$PID_DIR/$name.pid"
|
||||
local name="$1" desc="$2"
|
||||
local pidfile="$PID_DIR/$name.pid"
|
||||
if [[ -f "$pidfile" ]] && kill -0 "$(cat "$pidfile")" 2>/dev/null; then
|
||||
printf " ${GREEN}●${NC} %-18s PID=%-7s %s\n" "$name" "$(cat "$pidfile")" "$desc"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user