From c40ab4a986e7c1891762cbe9cf3653125a6bdc27 Mon Sep 17 00:00:00 2001 From: IceCodeNew <32576256+IceCodeNew@users.noreply.github.com> Date: Fri, 25 Sep 2020 16:53:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=20`remove=5Fv2ray`=20?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install-release.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/install-release.sh b/install-release.sh index 59b21c5..2481173 100644 --- a/install-release.sh +++ b/install-release.sh @@ -441,8 +441,10 @@ remove_v2ray() { "rm" /usr/local/bin/v2ray "rm" /usr/local/bin/v2ctl "rm" -r "$DAT_PATH" - "rm" /etc/systemd/system/v2ray.service - "rm" /etc/systemd/system/v2ray@.service + "rm" '/etc/systemd/system/v2ray.service' + "rm" '/etc/systemd/system/v2ray@.service' + "rm" -r '/etc/systemd/system/v2ray.service.d' + "rm" -r '/etc/systemd/system/v2ray@.service.d' if [[ "$?" -ne '0' ]]; then echo 'error: Failed to remove V2Ray.' exit 1 @@ -452,11 +454,17 @@ remove_v2ray() { echo "removed: $DAT_PATH" echo 'removed: /etc/systemd/system/v2ray.service' echo 'removed: /etc/systemd/system/v2ray@.service' + echo 'removed: /etc/systemd/system/v2ray.service.d' + echo 'removed: /etc/systemd/system/v2ray@.service.d' echo 'Please execute the command: systemctl disable v2ray' echo "You may need to execute a command to remove dependent software: $PACKAGE_MANAGEMENT_REMOVE curl unzip" echo 'info: V2Ray has been removed.' echo 'info: If necessary, manually delete the configuration and log files.' - echo "info: e.g., $JSON_PATH and /var/log/v2ray/ ..." + if [[ -n "$JSONS_PATH" ]]; then + echo "info: e.g., $JSONS_PATH and /var/log/v2ray/ ..." + else + echo "info: e.g., $JSON_PATH and /var/log/v2ray/ ..." + fi exit 0 fi else