优化restart模式

This commit is contained in:
jingrow 2025-08-19 17:01:04 +08:00
parent 2346cd86b1
commit 3392ca72ab

View File

@ -2080,18 +2080,8 @@ build_site() {
# 启动网站 # 启动网站
start_site() { start_site() {
log_info "启动网站: $SITE_NAME" log_info "启动网站: $SITE_NAME"
restart_site
if [ "$(get_site_status \"$SITE_NAME\")" = "not_exists" ]; then return $?
log_error "网站 $SITE_NAME 不存在"
return 1
fi
if ! start_project_with_pm2; then
log_error "网站启动失败"
return 1
fi
log_success "网站 $SITE_NAME 已启动"
} }
# 停止网站 # 停止网站