1 #!/bin/sh /etc/rc.common
6 if ! uci get lucid.rrdimg >/dev/null 2>/dev/null; then
8 set lucid.rrdimg=DirectoryPublisher
9 set lucid.rrdimg.name='Statistics Images'
10 set lucid.rrdimg.physical=/tmp/rrdimg
11 set lucid.rrdimg.virtual=/rrdimg
12 set lucid.rrdimg.domain=''
14 add_list lucid.http.publisher=rrdimg
15 add_list lucid.https.publisher=rrdimg
19 /etc/init.d/lucid restart
26 ### replace shipped config with symlink
27 if [ ! -L /etc/collectd.conf ]; then
28 test -f /etc/collectd.conf && mv /etc/collectd.conf /etc/collectd.conf.bak
29 ln -s /var/etc/collectd.conf /etc/collectd.conf
34 /usr/bin/stat-genconfig > /var/etc/collectd.conf
36 ### prepare rrdimg directory
37 if [ "$(uci get luci_statistics.rrdtool.image_path 2>/dev/null)" != "$(uci get lucid.rrdimg.physical 2>/dev/null)" ]; then
38 uci set lucid.rrdimg.physical=$(uci get luci_statistics.rrdtool.image_path)
40 /etc/init.d/lucid restart
43 ### flush LuCI index cache
44 test -f /var/luci-indexcache && rm /var/luci-indexcache
46 ### workaround broken permissions on /tmp
51 ### regenerate config / prepare environment
55 /etc/init.d/collectd restart