mirror of
https://github.com/kenzok8/small-package.git
synced 2026-02-06 14:56:34 +08:00
update 2025-06-11 20:47:40
This commit is contained in:
@@ -48,12 +48,9 @@ function renderStatus(isRunning, listen_port, noweb) {
|
||||
}
|
||||
|
||||
if (isRunning && noweb !== '1') {
|
||||
html += String.format(
|
||||
' <a class="btn cbi-button" href="%s:%s" target="_blank">%s</a>',
|
||||
window.location.origin,
|
||||
listen_port,
|
||||
_('Open Web Interface')
|
||||
);
|
||||
const baseUrl = `${window.location.protocol}//${window.location.hostname}`;
|
||||
const fullUrl = `${baseUrl}:${listen_port}`;
|
||||
html += String.format(' <a class="btn cbi-button" href="%s" target="_blank">%s</a>', fullUrl, _('Open Web Interface'));
|
||||
}
|
||||
|
||||
return html;
|
||||
|
||||
@@ -9,31 +9,14 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-netspeedtest
|
||||
|
||||
PKG_VERSION:=5.0.3
|
||||
PKG_RELEASE:=20250515
|
||||
PKG_VERSION:=5.0.4
|
||||
PKG_RELEASE:=20250611
|
||||
|
||||
LUCI_TITLE:=LuCI Support for netspeedtest
|
||||
LUCI_DEPENDS:=+speedtest-cli +homebox $(if $(find_package iperf3-ssl),+iperf3-ssl,+iperf3)
|
||||
LUCI_DEPENDS:=+speedtest-cli +homebox +netspeedtest $(if $(find_package iperf3-ssl),+iperf3-ssl,+iperf3)
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_MAINTAINER:=sirpdboy <herboy2008@gmail.com>
|
||||
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/config/netspeedtest
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/postinst
|
||||
#!/bin/sh
|
||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
if ! uci show netspeedtest.config >/dev/null 2>&1; then
|
||||
uci set netspeedtest.config=netspeedtest
|
||||
uci set netspeedtest.config.enabled='1'
|
||||
uci commit netspeedtest
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
||||
|
||||
43
netspeedtest/Makefile
Normal file
43
netspeedtest/Makefile
Normal file
@@ -0,0 +1,43 @@
|
||||
#
|
||||
# Copyright (C) 2025 sirpdboy herboy2008@gmail.com https://github.com/sirpdboy/luci-app-netspeedtest
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=netspeedtest
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Routing netspeedtest for OpenWrt
|
||||
DEPENDS:=+curl +bash
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Routing netspeedtest for OpenWrt @sirpdboy <herboy2008@gmail.com>
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/config/netspeedtest
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(CP) ./files/netspeedtest.config $(1)/etc/config/netspeedtest
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(CURDIR)/files/netspeedtest.init $(1)/etc/init.d/netspeedtest
|
||||
$(INSTALL_DIR) $(1)/usr/lib/netspeedtest
|
||||
$(INSTALL_BIN) $(CURDIR)/files/speedtest.lib $(1)/usr/lib/netspeedtest/speedtest
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) $(CURDIR)/files/99_netspeedtest.defaults $(1)/etc/uci-defaults/99_netspeedtest
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
2
netspeedtest/files/netspeedtest.config
Normal file
2
netspeedtest/files/netspeedtest.config
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
config netspeedtest 'config'
|
||||
Reference in New Issue
Block a user