From 52c390e753616fb61615b0525de576a18013d8bd Mon Sep 17 00:00:00 2001 From: smeb y <48400087+a3165458@users.noreply.github.com> Date: Mon, 1 Apr 2024 15:54:52 +0800 Subject: [PATCH] Update Artela.sh --- Artela.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Artela.sh b/Artela.sh index cba72d3..8b45cde 100644 --- a/Artela.sh +++ b/Artela.sh @@ -126,11 +126,23 @@ function view_logs() { # 卸载节点功能 function uninstall_node() { - pm2 delete artela-node - rm -rf $HOME/.artelad && rm -rf artela && sudo rm -rf $(which artelad) - echo "节点程序卸载完成。" + echo "你确定要卸载Artela 节点程序吗?这将会删除所有相关的数据。[Y/N]" + read -r -p "请确认: " response + + case "$response" in + [yY][eE][sS]|[yY]) + echo "开始卸载节点程序..." + pm2 stop artela-node && pm2 delete artela-node + rm -rf $HOME/.artelad $HOME/artela $(which artelad) + echo "节点程序卸载完成。" + ;; + *) + echo "取消卸载操作。" + ;; + esac } + # 主菜单 function main_menu() { while true; do