aboutsummaryrefslogtreecommitdiff
path: root/net/bcp38/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-04-19 09:04:30 +0200
committerToke Høiland-Jørgensen <toke@toke.dk>2018-04-19 11:02:10 +0200
commita6ea246cb2d9ae185200b1479af71a4acb75e541 (patch)
tree32bc1c7745c7a17c8ba1fb2f3c16a22ddb7482c6 /net/bcp38/files
parent6a9d2386c45350dc453bfba00cfd026e572cf88b (diff)
bcp38: add init script
This commit adds a simple procd init script for bcp38 with the sole purpose to register a configuration change trigger for /etc/config/bcp38. The change will allow for automatic firewall reloads triggered by invoking /sbin/reload_config or through ubus config change events emitted by LuCI. With the init script in place and started, calling ubus call service event '{"type":"config.change","data":{"package":"bcp38"}}' or /sbin/reload_config will issue an /etc/init.d/firewall reload if /etc/config/bcp38 has been modified since the last reload_config call. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'net/bcp38/files')
-rwxr-xr-xnet/bcp38/files/bcp38.init11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/bcp38/files/bcp38.init b/net/bcp38/files/bcp38.init
new file mode 100755
index 000000000..6c22c22f9
--- /dev/null
+++ b/net/bcp38/files/bcp38.init
@@ -0,0 +1,11 @@
+#!/bin/sh /etc/rc.common
+
+START=20
+
+USE_PROCD=1
+NAME=bcp38
+
+service_triggers()
+{
+ procd_add_config_trigger "config.change" "bcp38" /etc/init.d/firewall reload
+}