From 44410b7350b2d596c4654ac7c47bda1b23b5ab5f Mon Sep 17 00:00:00 2001 From: Chen Minqiang Date: Wed, 25 Nov 2020 23:15:08 +0800 Subject: [PATCH] p910nd: config trigger reload and default disabled Signed-off-by: Chen Minqiang --- net/p910nd/Makefile | 2 +- net/p910nd/files/p910nd.init | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/net/p910nd/Makefile b/net/p910nd/Makefile index cfe4ea7d9..cb5b7faec 100644 --- a/net/p910nd/Makefile +++ b/net/p910nd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=p910nd PKG_VERSION:=0.97 -PKG_RELEASE:=8 +PKG_RELEASE:=9 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/p910nd diff --git a/net/p910nd/files/p910nd.init b/net/p910nd/files/p910nd.init index 0eadebd65..2ddbdc712 100644 --- a/net/p910nd/files/p910nd.init +++ b/net/p910nd/files/p910nd.init @@ -29,7 +29,7 @@ start_service() { start_p910nd() { local section="$1" runas_root - config_get_bool "enabled" "$section" "enabled" '1' + config_get_bool "enabled" "$section" "enabled" '0' if [ "$enabled" -gt 0 ]; then args="-d " config_get port "$section" port @@ -57,3 +57,10 @@ start_p910nd() { procd_close_instance fi } + +service_triggers() +{ + procd_open_trigger + procd_add_config_trigger "config.change" "p910nd" /etc/init.d/p910nd reload + procd_close_trigger +}