Update install.sh

This commit is contained in:
midoks 2022-07-11 15:21:40 +08:00
parent 384c4b6423
commit fa7bf97fc2
1 changed files with 2 additions and 4 deletions

View File

@ -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