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 [ ! -L /www
/rrdimg
]; then
17 imagepath
="$(uci get luci_statistics.rrdtool.image_path)"
18 ln -s ${imagepath:-/tmp/rrdimg}/ /www
/rrdimg
23 ### regenerate config / prepare environment
27 /etc
/init.d
/collectd restart