mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
parent
bd2cb86082
commit
688feda0b0
43 changed files with 4 additions and 448 deletions
|
@ -1,47 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2018 Jeffery To
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=golang-golang-x-crypto
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
|
||||||
PKG_SOURCE_URL:=https://github.com/golang/crypto.git
|
|
||||||
PKG_SOURCE_VERSION:=4def268fd1a49955bfb3dda92fe3db4f924f2285
|
|
||||||
PKG_SOURCE_DATE:=20190701
|
|
||||||
#PKG_MIRROR_HASH:=80b16b203736ac56883d0610edbc5981eb78f15b7b35d11b5ca639f7c3814214
|
|
||||||
|
|
||||||
PKG_LICENSE:=BSD-3-Clause
|
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
|
||||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=golang/host
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
|
|
||||||
GO_PKG:=golang.org/x/crypto
|
|
||||||
GO_PKG_SOURCE_ONLY:=1
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
|
||||||
|
|
||||||
define Package/golang-golang-x-crypto-dev
|
|
||||||
$(call GoPackage/GoSubMenu)
|
|
||||||
TITLE:=Go supplementary cryptography libraries
|
|
||||||
URL:=https://godoc.org/golang.org/x/crypto
|
|
||||||
DEPENDS:=$(GO_ARCH_DEPENDS) \
|
|
||||||
+golang-golang-x-net-dev \
|
|
||||||
+golang-golang-x-sys-dev
|
|
||||||
PKGARCH:=all
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/golang-golang-x-crypto-dev/description
|
|
||||||
Supplementary Go cryptography libraries.
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call GoSrcPackage,golang-golang-x-crypto-dev))
|
|
||||||
$(eval $(call BuildPackage,golang-golang-x-crypto-dev))
|
|
|
@ -1,58 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2018 Jeffery To
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=golang-golang-x-net
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
|
||||||
PKG_SOURCE_URL:=https://github.com/golang/net.git
|
|
||||||
PKG_SOURCE_VERSION:=afe8f62b1d6bbd81f31868121a50b06d8188e1f9
|
|
||||||
PKG_SOURCE_DATE:=20180620
|
|
||||||
PKG_MIRROR_HASH:=9a8bb3bf21ea60121d7e87f1bd1af9effbdcd908f758be99457653172d13eb1e
|
|
||||||
|
|
||||||
PKG_LICENSE:=BSD-3-Clause
|
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
|
||||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=golang/host
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
|
|
||||||
GO_PKG:=golang.org/x/net
|
|
||||||
# exclude http2/h2i to break circular dependency with golang-golang-x-crypto-dev
|
|
||||||
# since there are no other binaries, can skip compilation
|
|
||||||
GO_PKG_SOURCE_ONLY:=1
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
|
||||||
|
|
||||||
define Package/golang-golang-x-net-dev
|
|
||||||
$(call GoPackage/GoSubMenu)
|
|
||||||
TITLE:=Go supplementary network libraries
|
|
||||||
URL:=https://godoc.org/golang.org/x/net
|
|
||||||
DEPENDS:=$(GO_ARCH_DEPENDS) +golang-golang-x-text-dev
|
|
||||||
PKGARCH:=all
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/golang-golang-x-net-dev/description
|
|
||||||
Supplementary Go networking libraries.
|
|
||||||
endef
|
|
||||||
|
|
||||||
# http2/testdata/draft-ietf-httpbis-http2.xml is a non-free document
|
|
||||||
# http2/z_spec_test.go uses http2/testdata/draft-ietf-httpbis-http2.xml
|
|
||||||
define Package/golang-golang-x-net-dev/install
|
|
||||||
$(call GoPackage/Package/Install/Src,$(1))
|
|
||||||
|
|
||||||
rm -f $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/testdata/draft-ietf-httpbis-http2.xml
|
|
||||||
rmdir $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/testdata/
|
|
||||||
|
|
||||||
rm -f $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/z_spec_test.go
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call GoSrcPackage,golang-golang-x-net-dev))
|
|
||||||
$(eval $(call BuildPackage,golang-golang-x-net-dev))
|
|
|
@ -1,46 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2018 Jeffery To
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=golang-golang-x-sys
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
|
||||||
PKG_SOURCE_URL:=https://github.com/golang/sys.git
|
|
||||||
PKG_SOURCE_VERSION:=63fc586f45fe72d95d5240a5d5eb95e6503907d3
|
|
||||||
PKG_SOURCE_DATE:=20180621
|
|
||||||
PKG_MIRROR_HASH:=3afe7936fb9fb291ef9b9cfa88f51576cdc19abbd34240232ce284958ac7dbaf
|
|
||||||
|
|
||||||
PKG_LICENSE:=BSD-3-Clause
|
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
|
||||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=golang/host
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
|
|
||||||
GO_PKG:=golang.org/x/sys
|
|
||||||
GO_PKG_SOURCE_ONLY:=1
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
|
||||||
|
|
||||||
define Package/golang-golang-x-sys-dev
|
|
||||||
$(call GoPackage/GoSubMenu)
|
|
||||||
TITLE:=Go packages for interaction with the OS
|
|
||||||
URL:=https://godoc.org/golang.org/x/sys
|
|
||||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
|
||||||
PKGARCH:=all
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/golang-golang-x-sys-dev/description
|
|
||||||
Supplementary Go packages for low-level interactions with the operating
|
|
||||||
system.
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call GoSrcPackage,golang-golang-x-sys-dev))
|
|
||||||
$(eval $(call BuildPackage,golang-golang-x-sys-dev))
|
|
|
@ -1,47 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2018 Jeffery To
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=golang-golang-x-text
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
|
||||||
PKG_SOURCE_URL:=https://github.com/golang/text.git
|
|
||||||
PKG_SOURCE_VERSION:=5cec4b58c438bd98288aeb248bab2c1840713d21
|
|
||||||
PKG_SOURCE_DATE:=20180520
|
|
||||||
PKG_MIRROR_HASH:=6c541a59f32f57afa54a2216045ddf16a077f8fe2e823fbbe77723eca04ddddb
|
|
||||||
|
|
||||||
PKG_LICENSE:=BSD-3-Clause
|
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
|
||||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=golang/host
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
|
|
||||||
GO_PKG:=golang.org/x/text
|
|
||||||
# exclude gotext (and message/pipeline) to avoid dependency on golang.org/x/tools
|
|
||||||
# since there are no other binaries, can skip compilation
|
|
||||||
GO_PKG_SOURCE_ONLY:=1
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
|
||||||
|
|
||||||
define Package/golang-golang-x-text-dev
|
|
||||||
$(call GoPackage/GoSubMenu)
|
|
||||||
TITLE:=Go text processing support
|
|
||||||
URL:=https://godoc.org/golang.org/x/text
|
|
||||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
|
||||||
PKGARCH:=all
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/golang-golang-x-text-dev/description
|
|
||||||
Supplementary Go libraries for text processing, many involving Unicode.
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call GoSrcPackage,golang-golang-x-text-dev))
|
|
||||||
$(eval $(call BuildPackage,golang-golang-x-text-dev))
|
|
|
@ -25,7 +25,7 @@ GO_PKG:=github.com/golang/protobuf
|
||||||
GO_PKG_SOURCE_ONLY:=1
|
GO_PKG_SOURCE_ONLY:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
include ../golang/golang-package.mk
|
||||||
|
|
||||||
define Package/golang-protobuf-dev
|
define Package/golang-protobuf-dev
|
||||||
$(call GoPackage/GoSubMenu)
|
$(call GoPackage/GoSubMenu)
|
||||||
|
|
0
lcd4linux/Config.in
Executable file → Normal file
0
lcd4linux/Config.in
Executable file → Normal file
0
lcd4linux/Makefile
Executable file → Normal file
0
lcd4linux/Makefile
Executable file → Normal file
0
lcd4linux/files/lcd4linux.init
Executable file → Normal file
0
lcd4linux/files/lcd4linux.init
Executable file → Normal file
0
lcd4linux/patches/120-remove-as-needed-linker-option.patch
Executable file → Normal file
0
lcd4linux/patches/120-remove-as-needed-linker-option.patch
Executable file → Normal file
0
lcd4linux/patches/140-no_repnop_T6963.patch
Executable file → Normal file
0
lcd4linux/patches/140-no_repnop_T6963.patch
Executable file → Normal file
0
lcd4linux/patches/150-addlibmpdclient.patch
Executable file → Normal file
0
lcd4linux/patches/150-addlibmpdclient.patch
Executable file → Normal file
0
lcd4linux/patches/160-uinput_defs.patch
Executable file → Normal file
0
lcd4linux/patches/160-uinput_defs.patch
Executable file → Normal file
0
lcd4linux/patches/170-add-generic-spidev-driver.patch
Executable file → Normal file
0
lcd4linux/patches/170-add-generic-spidev-driver.patch
Executable file → Normal file
0
lcd4linux/patches/173-glcd2usb-bigendian-fix.patch
Executable file → Normal file
0
lcd4linux/patches/173-glcd2usb-bigendian-fix.patch
Executable file → Normal file
|
@ -46,7 +46,7 @@ endef
|
||||||
|
|
||||||
define Package/msmtp
|
define Package/msmtp
|
||||||
$(call Package/msmtp/Default)
|
$(call Package/msmtp/Default)
|
||||||
DEPENDS+= +libgnutls +ca-bundle +libopenssl
|
DEPENDS+= +libgnutls +ca-bundle
|
||||||
TITLE+= (with SSL support)
|
TITLE+= (with SSL support)
|
||||||
VARIANT:=ssl
|
VARIANT:=ssl
|
||||||
DEFAULT_VARIANT:=1
|
DEFAULT_VARIANT:=1
|
||||||
|
|
0
r8168/Makefile
Executable file → Normal file
0
r8168/Makefile
Executable file → Normal file
0
r8168/patches/001-r8168-add-LED-configuration-from-OF.patch
Executable file → Normal file
0
r8168/patches/001-r8168-add-LED-configuration-from-OF.patch
Executable file → Normal file
|
@ -25,7 +25,7 @@ GO_PKG:=github.com/shadowsocks/v2ray-plugin
|
||||||
PKG_USE_MIPS16:=0
|
PKG_USE_MIPS16:=0
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
include ../golang/golang-package.mk
|
||||||
|
|
||||||
define Package/v2ray-plugin
|
define Package/v2ray-plugin
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
|
|
0
tracebox/Makefile
Executable file → Normal file
0
tracebox/Makefile
Executable file → Normal file
0
tracebox/files/usr/share/tracebox/omr-mptcp-trace.lua
Executable file → Normal file
0
tracebox/files/usr/share/tracebox/omr-mptcp-trace.lua
Executable file → Normal file
0
tracebox/patches/101-build-fixes.patch
Executable file → Normal file
0
tracebox/patches/101-build-fixes.patch
Executable file → Normal file
0
tracebox/patches/102-configure.patch
Executable file → Normal file
0
tracebox/patches/102-configure.patch
Executable file → Normal file
0
tracebox/patches/103-configure.patch
Executable file → Normal file
0
tracebox/patches/103-configure.patch
Executable file → Normal file
0
tracebox/patches/104-ns_name_compress.patch
Executable file → Normal file
0
tracebox/patches/104-ns_name_compress.patch
Executable file → Normal file
0
tracebox/patches/202-fix-lua-include-hpp.patch
Executable file → Normal file
0
tracebox/patches/202-fix-lua-include-hpp.patch
Executable file → Normal file
0
tracebox/patches/204-fix-lua-namespace-crafter.patch
Executable file → Normal file
0
tracebox/patches/204-fix-lua-namespace-crafter.patch
Executable file → Normal file
0
v2ray-core/Config.in
Executable file → Normal file
0
v2ray-core/Config.in
Executable file → Normal file
0
v2ray-core/LICENSE
Executable file → Normal file
0
v2ray-core/LICENSE
Executable file → Normal file
0
v2ray-core/Makefile
Executable file → Normal file
0
v2ray-core/Makefile
Executable file → Normal file
0
v2ray-core/files/etc/firewall.v2ray-rules
Executable file → Normal file
0
v2ray-core/files/etc/firewall.v2ray-rules
Executable file → Normal file
0
v2ray-core/files/etc/uci-defaults/3010-omr-v2ray
Executable file → Normal file
0
v2ray-core/files/etc/uci-defaults/3010-omr-v2ray
Executable file → Normal file
2
v2ray-ext/Makefile
Executable file → Normal file
2
v2ray-ext/Makefile
Executable file → Normal file
|
@ -25,7 +25,7 @@ GO_PKG:=v2ray.com/ext
|
||||||
GO_PKG_SOURCE_ONLY:=1
|
GO_PKG_SOURCE_ONLY:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
include ../golang/golang-package.mk
|
||||||
|
|
||||||
define Package/v2ray-ext-dev
|
define Package/v2ray-ext-dev
|
||||||
$(call GoPackage/GoSubMenu)
|
$(call GoPackage/GoSubMenu)
|
||||||
|
|
|
@ -1,90 +0,0 @@
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=vnstat2
|
|
||||||
PKG_VERSION:=2.9
|
|
||||||
PKG_RELEASE:=$(AUTORELEASE)
|
|
||||||
|
|
||||||
PKG_SOURCE:=vnstat-$(PKG_VERSION).tar.gz
|
|
||||||
PKG_SOURCE_URL:=https://humdi.net/vnstat
|
|
||||||
PKG_HASH:=11a21475dea91706500aba7c63e24126703fd01f13b1f3acdf92baa5aead9dc7
|
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0-only
|
|
||||||
PKG_LICENSE_FILES:=COPYING
|
|
||||||
PKG_MAINTAINER:=Jan Hoffmann <jan@3e8.eu>
|
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/vnstat-${PKG_VERSION}
|
|
||||||
|
|
||||||
PKG_FIXUP:=autoreconf
|
|
||||||
PKG_INSTALL:=1
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define Package/vnstat2/Default
|
|
||||||
SECTION:=net
|
|
||||||
CATEGORY:=Network
|
|
||||||
URL:=https://humdi.net/vnstat/
|
|
||||||
DEPENDS:=+libsqlite3
|
|
||||||
CONFLICTS:=vnstat
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/vnstat2
|
|
||||||
$(call Package/vnstat2/Default)
|
|
||||||
TITLE:=Console-based network traffic monitor
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/vnstat2/description
|
|
||||||
vnStat is a network traffic monitor for Linux that keeps a log of daily
|
|
||||||
network traffic for the selected interface(s). vnStat isn't a packet
|
|
||||||
sniffer. The traffic information is analyzed from the /proc -filesystem,
|
|
||||||
so vnStat can be used without root permissions.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/vnstati2
|
|
||||||
$(call Package/vnstat2/Default)
|
|
||||||
DEPENDS+=vnstat2 +libgd
|
|
||||||
TITLE:=PNG image output support for vnStat
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/vnstati2/description
|
|
||||||
The purpose of vnstati is to provide image output support for statistics
|
|
||||||
collected using vnstat. However, the image file format is limited to
|
|
||||||
png. All basic outputs of vnStat are supported excluding live traffic
|
|
||||||
features. The image can be outputted either to a file or to standard
|
|
||||||
output.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/vnstat2/conffiles
|
|
||||||
/etc/vnstat.conf
|
|
||||||
/etc/config/vnstat
|
|
||||||
endef
|
|
||||||
|
|
||||||
CONFIGURE_ARGS += --disable-extra-paths
|
|
||||||
|
|
||||||
define Package/vnstat2/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/vnstat $(1)/usr/bin/
|
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/vnstatd $(1)/usr/sbin/
|
|
||||||
$(INSTALL_DIR) $(1)/etc
|
|
||||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/cfg/vnstat.conf $(1)/etc/
|
|
||||||
$(INSTALL_DIR) $(1)/etc/config
|
|
||||||
$(INSTALL_CONF) ./files/vnstat.config $(1)/etc/config/vnstat
|
|
||||||
$(INSTALL_DIR) $(1)/etc/init.d
|
|
||||||
$(INSTALL_BIN) ./files/vnstat.init $(1)/etc/init.d/vnstat
|
|
||||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
|
||||||
$(INSTALL_DATA) ./files/vnstat.hotplug $(1)/etc/hotplug.d/iface/50-vnstat
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/vnstati2/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/vnstati $(1)/usr/bin/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,vnstat2))
|
|
||||||
$(eval $(call BuildPackage,vnstati2))
|
|
|
@ -1,2 +0,0 @@
|
||||||
config vnstat
|
|
||||||
# list interface br-lan
|
|
|
@ -1,23 +0,0 @@
|
||||||
/etc/init.d/vnstat running || exit 0
|
|
||||||
[ "$ACTION" = "ifup" ] || exit 0
|
|
||||||
|
|
||||||
. /lib/functions.sh
|
|
||||||
|
|
||||||
check_iface() {
|
|
||||||
local iface="$1"
|
|
||||||
|
|
||||||
[ "$iface" = "$DEVICE" ] || return
|
|
||||||
|
|
||||||
/usr/bin/vnstat --add -i "$iface" >/dev/null
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
check_ifaces() {
|
|
||||||
local cfg="$1"
|
|
||||||
|
|
||||||
config_list_foreach "$cfg" interface check_iface
|
|
||||||
}
|
|
||||||
|
|
||||||
config_load vnstat
|
|
||||||
config_foreach check_ifaces vnstat
|
|
|
@ -1,71 +0,0 @@
|
||||||
#!/bin/sh /etc/rc.common
|
|
||||||
|
|
||||||
START=60
|
|
||||||
STOP=50
|
|
||||||
|
|
||||||
USE_PROCD=1
|
|
||||||
|
|
||||||
vnstat_option() {
|
|
||||||
sed -ne "s/^[[:space:]]*$1[[:space:]]*['\"]\([^'\"]*\)['\"].*/\1/p" \
|
|
||||||
/etc/vnstat.conf
|
|
||||||
}
|
|
||||||
|
|
||||||
init_database() {
|
|
||||||
local lib database_count
|
|
||||||
|
|
||||||
lib="$(vnstat_option DatabaseDir)"
|
|
||||||
[ -n "$lib" ] || lib="/var/lib/vnstat"
|
|
||||||
|
|
||||||
database_count="$(ls "$lib" 2>/dev/null | wc -l)"
|
|
||||||
|
|
||||||
# only init database when folder is empty, as it would prevent import of legacy databases
|
|
||||||
if [ "$database_count" -eq "0" ]; then
|
|
||||||
/usr/sbin/vnstatd --initdb >/dev/null
|
|
||||||
else
|
|
||||||
# if vnstat.db doesn't exist, there are legacy databases to import
|
|
||||||
[ ! -f "$lib/vnstat.db" ] && echo -n "1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
init_ifaces() {
|
|
||||||
local cfg="$1"
|
|
||||||
|
|
||||||
init_iface() {
|
|
||||||
local ifn="$1"
|
|
||||||
|
|
||||||
/usr/bin/vnstat --add -i "$ifn" >/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
config_list_foreach "$cfg" interface init_iface
|
|
||||||
}
|
|
||||||
|
|
||||||
start_service() {
|
|
||||||
local options needs_import
|
|
||||||
|
|
||||||
needs_import="$(init_database)"
|
|
||||||
|
|
||||||
# --noadd would prevent import of legacy databases
|
|
||||||
[ -z "$needs_import" ] && options="--noadd --noexit"
|
|
||||||
|
|
||||||
config_load vnstat
|
|
||||||
config_foreach init_ifaces vnstat
|
|
||||||
|
|
||||||
procd_open_instance
|
|
||||||
procd_set_param stdout 1
|
|
||||||
procd_set_param stderr 1
|
|
||||||
procd_set_param command /usr/sbin/vnstatd --nodaemon $options
|
|
||||||
procd_set_param file /etc/vnstat.conf
|
|
||||||
procd_set_param respawn
|
|
||||||
procd_close_instance
|
|
||||||
}
|
|
||||||
|
|
||||||
reload_service() {
|
|
||||||
config_load vnstat
|
|
||||||
config_foreach init_ifaces vnstat
|
|
||||||
|
|
||||||
procd_send_signal vnstat
|
|
||||||
}
|
|
||||||
|
|
||||||
service_triggers() {
|
|
||||||
procd_add_reload_trigger vnstat
|
|
||||||
}
|
|
|
@ -1,60 +0,0 @@
|
||||||
--- a/src/daemon.c
|
|
||||||
+++ b/src/daemon.c
|
|
||||||
@@ -252,6 +252,7 @@ void initdstate(DSTATE *s)
|
|
||||||
s->sync = 0;
|
|
||||||
s->forcesave = 0;
|
|
||||||
s->noadd = 0;
|
|
||||||
+ s->noexit = 0;
|
|
||||||
s->initdb = 0;
|
|
||||||
s->iflisthash = 0;
|
|
||||||
s->cfgfile[0] = '\0';
|
|
||||||
@@ -282,6 +283,9 @@ void preparedatabase(DSTATE *s)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (s->noadd) {
|
|
||||||
+ if (s->noexit) {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
printf("No interfaces found in database, exiting.\n");
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
@@ -300,6 +304,9 @@ void preparedatabase(DSTATE *s)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!addinterfaces(s) && s->dbifcount == 0) {
|
|
||||||
+ if (s->noexit) {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
printf("Nothing to do, exiting.\n");
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
--- a/src/daemon.h
|
|
||||||
+++ b/src/daemon.h
|
|
||||||
@@ -4,7 +4,7 @@
|
|
||||||
typedef struct {
|
|
||||||
int updateinterval, saveinterval;
|
|
||||||
short running, dodbsave, rundaemon;
|
|
||||||
- short dbsaved, showhelp, sync, forcesave, noadd, initdb;
|
|
||||||
+ short dbsaved, showhelp, sync, forcesave, noadd, noexit, initdb;
|
|
||||||
short bootdetected, cleanuphour, dbretrycount;
|
|
||||||
uint32_t iflisthash;
|
|
||||||
uint64_t dbifcount;
|
|
||||||
--- a/src/vnstatd.c
|
|
||||||
+++ b/src/vnstatd.c
|
|
||||||
@@ -249,6 +249,7 @@ void showhelp(void)
|
|
||||||
printf(" --config <config file> select used config file\n");
|
|
||||||
printf(" --noadd prevent startup if database has no interfaces\n");
|
|
||||||
printf(" --alwaysadd [mode] automatically start monitoring all new interfaces\n");
|
|
||||||
+ printf(" --noexit keep running even when database has no interfaces\n");
|
|
||||||
printf(" --initdb create empty database and exit\n\n");
|
|
||||||
|
|
||||||
printf("See also \"man vnstatd\".\n");
|
|
||||||
@@ -322,6 +323,8 @@ void parseargs(DSTATE *s, int argc, char
|
|
||||||
} else {
|
|
||||||
cfg.alwaysadd = 1;
|
|
||||||
}
|
|
||||||
+ } else if (strcmp(argv[currentarg], "--noexit") == 0) {
|
|
||||||
+ s->noexit = 1;
|
|
||||||
} else if (strcmp(argv[currentarg], "--initdb") == 0) {
|
|
||||||
s->initdb = 1;
|
|
||||||
s->showhelp = 0;
|
|
0
xtables-addons/Makefile
Executable file → Normal file
0
xtables-addons/Makefile
Executable file → Normal file
0
xtables-addons/patches/001-fix-kernel-version-detection.patch
Executable file → Normal file
0
xtables-addons/patches/001-fix-kernel-version-detection.patch
Executable file → Normal file
0
xtables-addons/patches/100-add-rtsp-conntrack.patch
Executable file → Normal file
0
xtables-addons/patches/100-add-rtsp-conntrack.patch
Executable file → Normal file
0
xtables-addons/patches/200-add-lua-packetscript.patch
Executable file → Normal file
0
xtables-addons/patches/200-add-lua-packetscript.patch
Executable file → Normal file
0
xtables-addons/patches/201-fix-lua-packetscript.patch
Executable file → Normal file
0
xtables-addons/patches/201-fix-lua-packetscript.patch
Executable file → Normal file
0
xtables-addons/patches/210-freebsd-build-fix.patch
Executable file → Normal file
0
xtables-addons/patches/210-freebsd-build-fix.patch
Executable file → Normal file
Loading…
Add table
Add a link
Reference in a new issue