Skip to content

Commit

Permalink
卸载增加判断
Browse files Browse the repository at this point in the history
Signed-off-by: HITSword <[email protected]>
  • Loading branch information
HITSword committed Mar 5, 2020
1 parent e50eb8c commit 3f1ce51
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@ rm -rf /usr/local/udptools
echo "删除相关服务"
#判断服务模式
if pgrep systemd-journal; then
find /usr/lib/systemd/system/ -name "udp2raw*.service" | xargs -0 rm
find /usr/lib/systemd/system/ -name "udpspeeder*.service" | xargs -0 rm
if ls /usr/lib/systemd/system/ | grep -q -e "udp2raw*.service"; then
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
find /etc/init.d/ -name "udp2raw*" | xargs -0 rm
find /etc/init.d/ -name "udpspeeder*" | xargs -0 rm
if ls /etc/init.d/ | grep -q -e "udp2raw*"; then
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

0 comments on commit 3f1ce51

Please sign in to comment.