增加部署环境时,ctrl+c 完全终止部署流程方法

This commit is contained in:
ut001652 2024-07-18 19:42:50 +08:00
parent e865658290
commit 16f8460c0f
1 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,13 @@
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
# SPDX-License-Identifier: GPL-2.0-only
ctrl_c_handler(){
echo "正在退出……"
exit 1
}
trap ctrl_c_handler INT
check_status(){
if [ $? = 0 ]; then
echo -e "$1\t安装成功 √"