From 77c053dd60963b6e6a5ff67ba2d82573dccd6555 Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:53:28 +0330 Subject: [PATCH] Removing alias and bot --- core/scripts/hysteria2/uninstall.sh | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/core/scripts/hysteria2/uninstall.sh b/core/scripts/hysteria2/uninstall.sh index f5617b6..ba5e8df 100644 --- a/core/scripts/hysteria2/uninstall.sh +++ b/core/scripts/hysteria2/uninstall.sh @@ -1,28 +1,37 @@ source /etc/hysteria/core/scripts/path.sh echo "Uninstalling Hysteria2..." -#sleep 1 + echo "Running uninstallation script..." bash <(curl -fsSL https://get.hy2.sh/) --remove >/dev/null 2>&1 -#sleep 1 + echo "Removing WARP" python3 $CLI_PATH uninstall-warp + echo "Removing Hysteria folder..." rm -rf /etc/hysteria >/dev/null 2>&1 -#sleep 1 + echo "Deleting hysteria user..." userdel -r hysteria >/dev/null 2>&1 -#sleep 1 + echo "Removing systemd service files..." rm -f /etc/systemd/system/multi-user.target.wants/hysteria-server.service >/dev/null 2>&1 rm -f /etc/systemd/system/multi-user.target.wants/hysteria-server@*.service >/dev/null 2>&1 -#sleep 1 + echo "Reloading systemd daemon..." systemctl daemon-reload >/dev/null 2>&1 -#sleep 1 + echo "Removing cron jobs..." (crontab -l | grep -v "python3 /etc/hysteria/core/cli.py traffic-status" | crontab -) >/dev/null 2>&1 (crontab -l | grep -v "/etc/hysteria/core/scripts/hysteria2/kick.sh" | crontab -) >/dev/null 2>&1 -#sleep 1 + +echo "Removing alias 'hys2' from .bashrc..." +sed -i '/alias hys2=.*\/etc\/hysteria\/menu.sh/d' ~/.bashrc + +echo "Stopping hysteria-bot.service..." +systemctl stop hysteria-bot.service >/dev/null 2>&1 +echo "Disabling hysteria-bot.service..." +systemctl disable hysteria-bot.service >/dev/null 2>&1 + echo "Hysteria2 uninstalled!" -echo "" \ No newline at end of file +echo ""