statistics: remove references to Lucid from scripts
[project/luci.git] / applications / luci-app-statistics / root / etc / init.d / luci_statistics
1 #!/bin/sh /etc/rc.common
2 START=79
3
4 start() {
5 ### replace shipped config with symlink
6 mkdir -p /var/etc
7 if [ ! -L /etc/collectd.conf ]; then
8 test -f /etc/collectd.conf && mv /etc/collectd.conf /etc/collectd.conf.bak
9 ln -s /var/etc/collectd.conf /etc/collectd.conf
10 fi
11
12 ### create config
13 /usr/bin/stat-genconfig > /var/etc/collectd.conf
14
15 ### workaround broken permissions on /tmp
16 chmod 1777 /tmp
17 }
18
19 restart() {
20 ### regenerate config / prepare environment
21 start
22
23 ### restart collectd
24 /etc/init.d/collectd restart
25 }