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>
This commit is contained in:
parent
dcfc4569c4
commit
fa2975d7c5
1 changed files with 13 additions and 2 deletions
|
@ -1,7 +1,14 @@
|
||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
START=79
|
|
||||||
|
|
||||||
start() {
|
START=79
|
||||||
|
USE_PROCD=1
|
||||||
|
|
||||||
|
service_triggers()
|
||||||
|
{
|
||||||
|
procd_add_reload_trigger "luci_statistics"
|
||||||
|
}
|
||||||
|
|
||||||
|
start_service() {
|
||||||
### replace shipped config with symlink
|
### replace shipped config with symlink
|
||||||
mkdir -p /var/etc
|
mkdir -p /var/etc
|
||||||
if [ ! -L /etc/collectd.conf ]; then
|
if [ ! -L /etc/collectd.conf ]; then
|
||||||
|
@ -16,6 +23,10 @@ start() {
|
||||||
chmod 1777 /tmp
|
chmod 1777 /tmp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reload_service() {
|
||||||
|
restart "$@"
|
||||||
|
}
|
||||||
|
|
||||||
restart() {
|
restart() {
|
||||||
### regenerate config / prepare environment
|
### regenerate config / prepare environment
|
||||||
start
|
start
|
||||||
|
|
Loading…
Reference in a new issue