From 5abbd3bcb2362963a2cc49c0a9de78dd5c5af185 Mon Sep 17 00:00:00 2001 From: Ray Wang Date: Sat, 20 Apr 2024 22:53:03 +0800 Subject: [PATCH] natmap: add log_std{out,err} options Introduce `log_stdout` and `log_stderr` options for managing logging output. Signed-off-by: Ray Wang --- net/natmap/Makefile | 2 +- net/natmap/files/natmap.config | 2 ++ net/natmap/files/natmap.init | 8 +++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/net/natmap/Makefile b/net/natmap/Makefile index 6e43a8f4e5..47809d46e1 100644 --- a/net/natmap/Makefile +++ b/net/natmap/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=natmap PKG_VERSION:=20240303 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/heiher/natmap/releases/download/$(PKG_VERSION) diff --git a/net/natmap/files/natmap.config b/net/natmap/files/natmap.config index 6e8862b334..c003fc59de 100644 --- a/net/natmap/files/natmap.config +++ b/net/natmap/files/natmap.config @@ -10,4 +10,6 @@ config natmap option forward_target '' option forward_port '' option notify_script '' + option log_stdout '1' + option log_stderr '1' diff --git a/net/natmap/files/natmap.init b/net/natmap/files/natmap.init index a0ec4b26df..bfead56f93 100644 --- a/net/natmap/files/natmap.init +++ b/net/natmap/files/natmap.init @@ -27,7 +27,9 @@ validate_section_natmap() { 'port:port' \ 'forward_target:host' \ 'forward_port:port' \ - 'notify_script:file' + 'notify_script:file' \ + 'log_stdout:bool:1' \ + 'log_stderr:bool:1' } natmap_instance() { @@ -63,8 +65,8 @@ natmap_instance() { procd_append_param command -e /usr/lib/natmap/update.sh procd_set_param respawn - procd_set_param stdout 1 - procd_set_param stderr 1 + procd_set_param stdout "${log_stdout}" + procd_set_param stderr "${log_stderr}" procd_close_instance } -- 2.30.2