p910nd: config trigger reload and default disabled
authorChen Minqiang <ptpt52@gmail.com>
Wed, 25 Nov 2020 15:15:08 +0000 (23:15 +0800)
committerChen Minqiang <ptpt52@gmail.com>
Thu, 26 Nov 2020 07:47:07 +0000 (15:47 +0800)
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
net/p910nd/Makefile
net/p910nd/files/p910nd.init

index cfe4ea7d916ba56bb386d2ebce241fa6b3500ce3..cb5b7faecff829a13f4867aa28edc36b3d169aab 100644 (file)
@@ -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
index 0eadebd65ec11a14ae2d4c3a1a95d77e6907d2e9..2ddbdc7128d8b7707af513cee08ff7f12f48769b 100644 (file)
@@ -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
+}