mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-29 08:55:13 +08:00
🍕 Sync 2026-03-09 23:48:08
This commit is contained in:
1 parent
19e9ac0903
commit
8e25ba7eb6
12 files changed
+140
-28
No files matched your search
+9
-5
@@ -1,4 +1,6 @@
|
||||
#
|
||||
# Copyright (C) 2015-2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
#
|
||||
|
||||
@@ -7,14 +9,15 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_ARCH_FASTNET:=$(ARCH)
|
||||
|
||||
PKG_NAME:=fastnet
|
||||
PKG_VERSION:=0.7.5
|
||||
PKG_RELEASE:=1
|
||||
# use PKG_SOURCE_DATE instead of PKG_VERSION for compatible
|
||||
PKG_SOURCE_DATE:=0.7.2
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_SOURCE_DATE).tar.gz
|
||||
PKG_SOURCE_URL:=http://dl.istoreos.com/binary/fastnet/
|
||||
PKG_HASH:=skip
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_SOURCE_DATE)
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
@@ -27,6 +30,7 @@ define Package/$(PKG_NAME)
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=FastNet - network test Web UI
|
||||
DEPENDS:=@(arm||x86_64||aarch64)
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
@@ -53,7 +57,7 @@ endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fastnet.$(PKG_ARCH_FASTNET) $(1)/usr/sbin/FastNet
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fastnet.$(PKG_ARCH_FASTNET) $(1)/usr/sbin/fastnet
|
||||
$(INSTALL_CONF) ./files/fastnet.config $(1)/etc/config/fastnet
|
||||
$(INSTALL_BIN) ./files/fastnet.init $(1)/etc/init.d/fastnet
|
||||
$(INSTALL_BIN) ./files/fastnet.uci-default $(1)/etc/uci-defaults/fastnet
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
config fastnet
|
||||
option enabled '1'
|
||||
option host '0.0.0.0'
|
||||
option port '3200'
|
||||
option token ''
|
||||
option logger '0'
|
||||
Regular → Executable
+3
-2
@@ -5,6 +5,7 @@ USE_PROCD=1
|
||||
|
||||
get_config() {
|
||||
config_get_bool enabled "$1" enabled 1
|
||||
config_get host "$1" host "0.0.0.0"
|
||||
config_get port "$1" port 3200
|
||||
config_get token "$1" token ""
|
||||
config_get_bool logger "$1" logger 0
|
||||
@@ -15,11 +16,11 @@ start_service() {
|
||||
config_foreach get_config fastnet
|
||||
[ "$enabled" != 1 ] && return 1
|
||||
|
||||
addr="0.0.0.0:${port}"
|
||||
addr="${host}:${port}"
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param limits nofile="65535 65535"
|
||||
procd_set_param command /usr/sbin/FastNet web --addr "$addr" --no-open
|
||||
procd_set_param command /usr/sbin/fastnet web --addr "$addr" --no-open
|
||||
[ -n "$token" ] && procd_append_param command --token "$token"
|
||||
[ "$logger" = 1 ] && procd_set_param stderr 1
|
||||
procd_set_param respawn
|
||||
|
||||
@@ -14,6 +14,14 @@ uci -q batch <<-EOF_UCI >/dev/null
|
||||
set ucitrack.@fastnet[-1].init=fastnet
|
||||
commit ucitrack
|
||||
|
||||
delete firewall.fastnet
|
||||
set firewall.fastnet=rule
|
||||
set firewall.fastnet.name="fastnet"
|
||||
set firewall.fastnet.target="ACCEPT"
|
||||
set firewall.fastnet.src="wan"
|
||||
set firewall.fastnet.proto="tcp"
|
||||
set firewall.fastnet.dest_port="3200"
|
||||
commit firewall
|
||||
EOF_UCI
|
||||
|
||||
/etc/init.d/fastnet enable
|
||||
|
||||
Reference in new issue
Block a user