zerotier: add configuration reload trigger
authorJo-Philipp Wich <jo@mein.io>
Wed, 1 Dec 2021 14:50:52 +0000 (15:50 +0100)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Thu, 13 Jan 2022 09:40:32 +0000 (10:40 +0100)
Ensure that the zerotier service is automatically restarted when the uci
configuration is modified.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 04d0e45da1b6126643c54a22c39488b7095a5594)

net/zerotier/Makefile
net/zerotier/files/etc/init.d/zerotier

index 20a7085498db71c49410a18ba630489e3338c9ab..3014e9ed46e3e74550be5834a95f8a8b16dba200 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zerotier
 PKG_VERSION:=1.6.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)?
index c308b4246ee53ffd45aff5b11a5cfa93743dd26c..5c4ad185dd55069f4c48b42a1e9fd13190667d1f 100755 (executable)
@@ -109,3 +109,12 @@ stop_service() {
        config_foreach stop_instance 'zerotier'
        rm -f ${CONFIG_PATH}
 }
+
+reload_service() {
+       stop
+       start
+}
+
+service_triggers() {
+       procd_add_reload_trigger 'zerotier'
+}