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