From fa7bf97fc2891e79efe8ce40b35656c186335c10 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 11 Jul 2022 15:21:40 +0800 Subject: [PATCH] Update install.sh --- plugins/swap/install.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/swap/install.sh b/plugins/swap/install.sh index 321c69bf5..eb7bba95c 100755 --- a/plugins/swap/install.sh +++ b/plugins/swap/install.sh @@ -38,13 +38,11 @@ Uninstall_swap() { swapoff $serverPath/swap/swapfile - if [ -f /usr/lib/systemd/system/swap.service ];then - rm -rf /lib/systemd/system/swap.service - fi - if [ -f /usr/lib/systemd/system/swap.service ];then + if [ -f /usr/lib/systemd/system/swap.service ] || [ -f /lib/systemd/system/swap.service ];then systemctl stop swap systemctl disable swap + rm -rf /usr/lib/systemd/system/swap.service rm -rf /lib/systemd/system/swap.service systemctl daemon-reload fi