From f7240c049ba945fb64b2770dc466cbcd82d95768 Mon Sep 17 00:00:00 2001 From: HITSword Date: Thu, 5 Mar 2020 16:31:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=B8=E8=BD=BD=E5=A2=9E=E5=8A=A0=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: HITSword --- uninstall.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/uninstall.sh b/uninstall.sh index 5b49245..6f94839 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -3,8 +3,12 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH echo "杀掉进程" -killall udp2raw -killall udpspeeder +if ps aux | grep -q -e "udp2raw"; then + killall udp2raw +fi +if ps aux | grep -q -e "udpspeeder"; then + killall udpspeeder +fi echo "删除所有udptools文件" rm -rf /usr/local/udptools echo "删除相关服务" @@ -23,4 +27,5 @@ if pgrep systemd-journal; then if ls /etc/init.d/ | grep -q -e "udpspeeder*"; then find /etc/init.d/ -name "udpspeeder*" | xargs -0 rm fi -fi \ No newline at end of file +fi +echo "卸载完成" \ No newline at end of file