1 #!/bin/sh /etc/rc.common
5 ### replace shipped config with symlink
6 if [ ! -L /etc/collectd.conf ]; then
7 test -f /etc/collectd.conf && mv /etc/collectd.conf /etc/collectd.conf.bak
8 ln -s /var/etc/collectd.conf /etc/collectd.conf
13 /usr/bin/stat-genconfig > /var/etc/collectd.conf
15 ### prepare rrdimg directory
16 if [ -f /etc/config/lucid ] && [ -x /etc/init.d/lucid ] && /etc/init.d/lucid enabled && \
17 [ "$(uci get luci_statistics.rrdtool.image_path 2>/dev/null)" != "$(uci get lucid.statistics.physical 2>/dev/null)" ]; then
18 uci set lucid.statistics.physical=$(uci get luci_statistics.rrdtool.image_path)
20 /etc/init.d/lucid restart
23 ### workaround broken permissions on /tmp
28 ### regenerate config / prepare environment
32 /etc/init.d/collectd restart