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