mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 10:31:51 +00:00
Use Busybox syslogd
This commit is contained in:
parent
193a98bb7f
commit
5f8f4ee4fd
3 changed files with 84 additions and 1 deletions
|
@ -82,7 +82,7 @@ MY_DEPENDS := \
|
|||
luci-app-acl block-mount blockd fstools luci-app-shutdown libwebp luci-proto-gre tcptraceroute luci-proto-mbim kmod-rtl8xxxu kmod-ath9k-htc luci-app-ttyd luci-mod-dashboard (TARGET_x86||TARGET_x86_64):rtl8192eu-firmware kmod-usb2 libustream-openssl (TARGET_x86||TARGET_x86_64):kmod-ixgbevf (TARGET_x86||TARGET_x86_64):kmod-igbvf \
|
||||
hwinfo (TARGET_x86||TARGET_x86_64):dmidecode luci-app-packet-capture kmod-bonding luci-proto-bonding luci-app-sysupgrade \
|
||||
luci-theme-openwrt-2020 luci-proto-wireguard luci-app-wireguard kmod-crypto-lib-blake2s (TARGET_x86||TARGET_x86_64):kmod-r8125 \
|
||||
(LINUX_5_15||LINUX_6_1):mptcpd (TARGET_x86||TARGET_x86_64):kmod-igc !TARGET_mvebu:kmod-mmc-spi kmod-macsec usbutils v2ray-core
|
||||
(LINUX_5_15||LINUX_6_1):mptcpd (TARGET_x86||TARGET_x86_64):kmod-igc !TARGET_mvebu:kmod-mmc-spi kmod-macsec usbutils v2ray-core syslogd
|
||||
# !TARGET_mvebu:kmod-usb-net-smsc75xx
|
||||
# libnetfilter-conntrack ebtables ebtables-utils ip-full nstat \
|
||||
|
||||
|
|
59
syslogd/Makefile
Normal file
59
syslogd/Makefile
Normal file
|
@ -0,0 +1,59 @@
|
|||
#
|
||||
# Copyright (C) 2023 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3 or later.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=syslogd
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/syslogd
|
||||
SECTION:=utilities
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Busybox syslogd OpenWRT init script
|
||||
DEPENDS:=+busybox
|
||||
KCONFIG:=\
|
||||
CONFIG_BUSYBOX_CUSTOM=y \
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOG=y \
|
||||
CONFIG_BUSYBOX_CONFIG_LOGREAD=y \
|
||||
CONFIG_BUSYBOX_CONFIG_SYSLOGD=y \
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOGD_CFG=y \
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOGD_PRECISE_TIMESTAMPS=y \
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 \
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG=y \
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=64
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/syslogd/description
|
||||
Busybox syslogd package with init script for OpenWRT
|
||||
endef
|
||||
|
||||
define Package/syslogd/conffiles
|
||||
/etc/syslog.conf
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/syslogd/install
|
||||
$(INSTALL_DIR) $(1)
|
||||
$(CP) ./files/* $(1)/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,syslogd))
|
24
syslogd/files/etc/init.d/syslogd
Executable file
24
syslogd/files/etc/init.d/syslogd
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=11
|
||||
|
||||
USE_PROCD=1
|
||||
NAME=syslogd
|
||||
PROG=/sbin/syslogd
|
||||
|
||||
start_service() {
|
||||
local log_size=$(uci -q get system.@system[0].log_size)
|
||||
local log_ip=$(uci -q get system.@system[0].log_ip)
|
||||
local log_port=$(uci -q get system.@system[0].log_port || echo '514')
|
||||
local log_file=$(uci -q get system.@system[0].log_file)
|
||||
local conloglevel=$(uci -q get system.@system[0].conloglevel)
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG" -n ${log_size:+-C"$log_size"} ${log_ip:+-R"$log_ip":"$log_port"} ${log_file:+-O "$log_file"} ${conloglevel:+-l "$conloglevel"}
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
procd_send_signal syslogd
|
||||
}
|
Loading…
Reference in a new issue