diff --git a/dbm-ui/backend/flow/utils/cloud/script_template/dbha_template.py b/dbm-ui/backend/flow/utils/cloud/script_template/dbha_template.py index 055d9e22b7..ebd2371324 100644 --- a/dbm-ui/backend/flow/utils/cloud/script_template/dbha_template.py +++ b/dbm-ui/backend/flow/utils/cloud/script_template/dbha_template.py @@ -319,9 +319,9 @@ echo -e " # 检查进程是否存在 is_process_running() { - ps aux | grep {{dbha_type}} | grep -v grep | awk '{print \$2}' > /dev/null + ps aux | grep {{dbha_conf}} | grep -v grep | awk '{print \$2}' > /dev/null } -if is_process_running; then +if ! is_process_running; then echo "Process {{dbha_type}} is not running. Restarting..." cd /usr/local/bkdb/dbha/{{dbha_type}} # 启动进程的命令