From 1bc85961c66244df8c38bad5ffd53b4f00156c55 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 23:35:47 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=A4=20Sync=202023-10-01=2023:35:47?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luci-app-iperf3-server/Makefile | 4 ++-- .../root/etc/init.d/iperf3-server | 20 +++++++++---------- .../luasrc/view/mosdns/mosdns_flush_cache.htm | 2 +- .../luasrc/view/mosdns/mosdns_geo_update.htm | 2 +- .../luasrc/view/mosdns/mosdns_log.htm | 2 +- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/luci-app-iperf3-server/Makefile b/luci-app-iperf3-server/Makefile index 19d3f14fa..e1ef2f7e3 100755 --- a/luci-app-iperf3-server/Makefile +++ b/luci-app-iperf3-server/Makefile @@ -1,8 +1,8 @@ -# Copyright (C) 2020-2021 Hyy2001X +# Copyright (C) 2020-2023 Hyy2001X include $(TOPDIR)/rules.mk -LUCI_TITLE:=LuCI support for iPerf3 +LUCI_TITLE:=LuCI support for iPerf3 server LUCI_DEPENDS:=+iperf3 LUCI_PKGARCH:=all diff --git a/luci-app-iperf3-server/root/etc/init.d/iperf3-server b/luci-app-iperf3-server/root/etc/init.d/iperf3-server index 4999dc54c..81252f182 100755 --- a/luci-app-iperf3-server/root/etc/init.d/iperf3-server +++ b/luci-app-iperf3-server/root/etc/init.d/iperf3-server @@ -1,11 +1,9 @@ #!/bin/sh /etc/rc.common START=99 -USE_PROCD=1 LOGGER="logger -t [iPerf3-Server]" -start_service() { - stop_service +start() { local basic_list="main_enable" local server_list="port delay extra_options enable_server" for i in $(echo $basic_list) @@ -18,7 +16,6 @@ start_service() { # server_number=$(uci show iperf3-server 2> /dev/null | egrep -o '@servers\[[0-9]\]+=servers' | awk 'END {print}' | egrep -o "[0-9]") for u in $(seq 0 $((${server_number} - 1))) do - { for i in $server_list do eval ${i}=$(uci_get_by_type servers $u $i) @@ -27,14 +24,15 @@ start_service() { then sleep $delay $LOGGER "Starting iPerf3 Server [$u] with Port [$port] ..." - # $(command -v iperf3) -s -D -p $port $extra_options - procd_open_instance - procd_set_param command sleep $delay ; $(command -v iperf3) -s -D -p $port $extra_options - procd_set_param respawn 3000 3 10 - procd_close_instance + old_process="$(ps -efww | grep 'iperf3 -s -D -p $port' | grep -v 'grep' | awk '{print $1}')" + [ "$old_process" ] && kill -9 "$old_process" 2> /dev/null + $(command -v iperf3) -s -D -p $port $extra_options + #procd_open_instance + #procd_set_param command sleep $delay ; $(command -v iperf3) -s -D -p $port $extra_options + #procd_set_param respawn 3000 3 10 + #procd_close_instance fi unset enable_server delay - } & done ; unset u else $LOGGER "iPerf3 Server is disabled ..." @@ -42,7 +40,7 @@ start_service() { fi } -stop_service() { +stop() { $LOGGER "Stopping iPerf3 Server ..." ps -efww | grep 'iperf3 -s -D' | grep -v 'grep' | awk '{print $1}' | xargs kill -9 } diff --git a/luci-app-mosdns/luasrc/view/mosdns/mosdns_flush_cache.htm b/luci-app-mosdns/luasrc/view/mosdns/mosdns_flush_cache.htm index 71267544f..6734fbf0d 100644 --- a/luci-app-mosdns/luasrc/view/mosdns/mosdns_flush_cache.htm +++ b/luci-app-mosdns/luasrc/view/mosdns/mosdns_flush_cache.htm @@ -29,6 +29,6 @@ return false; } //]]> - + <%=self.value%> <%+cbi/valuefooter%> diff --git a/luci-app-mosdns/luasrc/view/mosdns/mosdns_geo_update.htm b/luci-app-mosdns/luasrc/view/mosdns/mosdns_geo_update.htm index 660311c31..813b3b530 100644 --- a/luci-app-mosdns/luasrc/view/mosdns/mosdns_geo_update.htm +++ b/luci-app-mosdns/luasrc/view/mosdns/mosdns_geo_update.htm @@ -29,6 +29,6 @@ return false; } //]]> - + <%=self.value%> <%+cbi/valuefooter%> diff --git a/luci-app-mosdns/luasrc/view/mosdns/mosdns_log.htm b/luci-app-mosdns/luasrc/view/mosdns/mosdns_log.htm index 6839302f4..9698f6917 100644 --- a/luci-app-mosdns/luasrc/view/mosdns/mosdns_log.htm +++ b/luci-app-mosdns/luasrc/view/mosdns/mosdns_log.htm @@ -28,6 +28,6 @@ //]]>
- +