diff --git a/udptools_install.sh b/install.sh similarity index 95% rename from udptools_install.sh rename to install.sh index cca64ca..fe48a5c 100644 --- a/udptools_install.sh +++ b/install.sh @@ -87,5 +87,6 @@ if [ ! -d "/usr/local/udptools/log" ]; then mkdir /usr/local/udptools/log fi +echo "安装完成,请使用udptools脚本添加服务" echo "Udp2Raw BIN: /usr/local/udptools/bin/udp2raw" echo "UdpSpeeder BIN:/usr/local/udptools/bin/udpspeeder" \ No newline at end of file diff --git a/systemctl/service/udp2raw-client.service b/systemctl/service/udp2raw-client@.service similarity index 100% rename from systemctl/service/udp2raw-client.service rename to systemctl/service/udp2raw-client@.service diff --git a/systemctl/service/udpspeeder-client.service b/systemctl/service/udpspeeder-client@.service similarity index 100% rename from systemctl/service/udpspeeder-client.service rename to systemctl/service/udpspeeder-client@.service diff --git a/uninstall.sh b/uninstall.sh new file mode 100644 index 0000000..2917070 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,18 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +echo "杀掉进程" +killall udp2raw +killall udpspeeder +echo "删除所有udptools文件" +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 + else + find /etc/init.d/ -name "udp2raw*" | xargs -0 rm + find /etc/init.d/ -name "udpspeeder*" | xargs -0 rm +fi \ No newline at end of file