summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-05-02 07:13:34 +0200
committerJo-Philipp Wich <jo@mein.io>2018-05-02 07:15:58 +0200
commitfa2975d7c5ccc111057d0803ca59f1cef186bf28 (patch)
treed05315322922d44294b6be0f9c7007e45eec5abc
parentdcfc4569c483f4218cf41b26ef0f4dfed0441c55 (diff)
luci-app-statistics: convert init script to procd
Convert init script to procd format in order to register reload triggers on /etc/config/luci_statistics. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rwxr-xr-xapplications/luci-app-statistics/root/etc/init.d/luci_statistics13
1 files changed, 12 insertions, 1 deletions
diff --git a/applications/luci-app-statistics/root/etc/init.d/luci_statistics b/applications/luci-app-statistics/root/etc/init.d/luci_statistics
index ab75b69df..2dc176c83 100755
--- a/applications/luci-app-statistics/root/etc/init.d/luci_statistics
+++ b/applications/luci-app-statistics/root/etc/init.d/luci_statistics
@@ -1,7 +1,14 @@
#!/bin/sh /etc/rc.common
+
START=79
+USE_PROCD=1
+
+service_triggers()
+{
+ procd_add_reload_trigger "luci_statistics"
+}
-start() {
+start_service() {
### replace shipped config with symlink
mkdir -p /var/etc
if [ ! -L /etc/collectd.conf ]; then
@@ -16,6 +23,10 @@ start() {
chmod 1777 /tmp
}
+reload_service() {
+ restart "$@"
+}
+
restart() {
### regenerate config / prepare environment
start