From 4555f1ad9a0dad01bb7269a77bfabc9105af03a6 Mon Sep 17 00:00:00 2001 From: 233boy <31657650+233boy@users.noreply.github.com> Date: Fri, 14 Jun 2019 09:03:15 +0800 Subject: [PATCH] fix v2ray command not found --- src/download-v2ray.sh | 1 + src/uninstall.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/download-v2ray.sh b/src/download-v2ray.sh index b291ddb..4cc285e 100644 --- a/src/download-v2ray.sh +++ b/src/download-v2ray.sh @@ -30,6 +30,7 @@ _download_v2ray_file() { mkdir -p /usr/bin/v2ray cp -f "/tmp/v2ray/v2ray" "/usr/bin/v2ray/v2ray" chmod +x "/usr/bin/v2ray/v2ray" + echo "alias v2ray=$_v2ray_sh" >>/root/.bashrc cp -f "/tmp/v2ray/v2ctl" "/usr/bin/v2ray/v2ctl" chmod +x "/usr/bin/v2ray/v2ctl" } diff --git a/src/uninstall.sh b/src/uninstall.sh index cb3989b..a2e881b 100644 --- a/src/uninstall.sh +++ b/src/uninstall.sh @@ -86,6 +86,7 @@ if [[ $is_uninstall_v2ray && $is_uninstall_caddy ]]; then rm -rf /usr/bin/v2ray rm -rf $_v2ray_sh + sed -i '/alias v2ray=/d' /root/.bashrc rm -rf /etc/v2ray rm -rf /var/log/v2ray @@ -148,6 +149,7 @@ elif [[ $is_uninstall_v2ray ]]; then rm -rf /usr/bin/v2ray rm -rf $_v2ray_sh + sed -i '/alias v2ray=/d' /root/.bashrc rm -rf /etc/v2ray rm -rf /var/log/v2ray if [[ $systemd ]]; then