卸载增加判断

Signed-off-by: HITSword <admin@huayizhiyun.com>
master
HITSword 2020-03-05 16:30:05 +08:00
parent e50eb8c37e
commit 3f1ce51dc4
1 changed files with 12 additions and 4 deletions

View File

@ -10,9 +10,17 @@ rm -rf /usr/local/udptools
echo "删除相关服务" echo "删除相关服务"
#判断服务模式 #判断服务模式
if pgrep systemd-journal; then if pgrep systemd-journal; then
find /usr/lib/systemd/system/ -name "udp2raw*.service" | xargs -0 rm if ls /usr/lib/systemd/system/ | grep -q -e "udp2raw*.service"; then
find /usr/lib/systemd/system/ -name "udpspeeder*.service" | xargs -0 rm find /usr/lib/systemd/system/ -name "udp2raw*.service" | xargs -0 rm
fi
if ls /usr/lib/systemd/system/ | grep -q -e "udpspeeder*.service"; then
find /usr/lib/systemd/system/ -name "udpspeeder*.service" | xargs -0 rm
fi
else else
find /etc/init.d/ -name "udp2raw*" | xargs -0 rm if ls /etc/init.d/ | grep -q -e "udp2raw*"; then
find /etc/init.d/ -name "udpspeeder*" | xargs -0 rm find /etc/init.d/ -name "udp2raw*" | xargs -0 rm
fi
if ls /etc/init.d/ | grep -q -e "udpspeeder*"; then
find /etc/init.d/ -name "udpspeeder*" | xargs -0 rm
fi
fi fi