luci/applications/luci-app-statistics/root/etc/init.d/luci_statistics
Hannu Nyman 0d5070c510 statistics: remove references to Lucid from scripts
Both init.d and uci-defaults scripts included in luci-app-statistics
still contained stuff related to lucid, which package was removed by
91b97bc9f6

Changes to scripts:
* init.d: lucid reference removed,
          /var/etc creation moved earlier (before first possible use)
* uci-defaults: lucid parameters & restart removed
  (but busybox httpd stuff was left intact, although it might be unnecessary)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-30 14:00:29 +03:00

25 lines
527 B
Bash
Executable file

#!/bin/sh /etc/rc.common
START=79
start() {
### replace shipped config with symlink
mkdir -p /var/etc
if [ ! -L /etc/collectd.conf ]; then
test -f /etc/collectd.conf && mv /etc/collectd.conf /etc/collectd.conf.bak
ln -s /var/etc/collectd.conf /etc/collectd.conf
fi
### create config
/usr/bin/stat-genconfig > /var/etc/collectd.conf
### workaround broken permissions on /tmp
chmod 1777 /tmp
}
restart() {
### regenerate config / prepare environment
start
### restart collectd
/etc/init.d/collectd restart
}