deploy shell update

This commit is contained in:
WJQSERVER 2024-10-25 18:00:31 +08:00
parent b1c8658a1c
commit f80782b803
4 changed files with 79 additions and 20 deletions

View file

@ -7,7 +7,21 @@ systemctl stop ghproxy
systemctl disable ghproxy
rm /etc/systemd/system/ghproxy.service
# 获取安装文件夹
read -p "请输入 ghproxy 安装文件夹路径(默认 /usr/local/ghproxy): " install_path
if [ -z "$install_path" ]; then
install_path="/usr/local/ghproxy"
fi
# 删除 ghproxy 文件夹
rm -r /root/data/ghproxy
# 检查目录是否存在ghproxy文件
if [ -f "$install_path" ]; then
echo "ghproxy 未安装或安装路径错误"
exit 1
else
echo "ghproxy 安装目录已确认,正在卸载..."
rm -r $install_path
fi
echo "ghproxy 已成功卸载"