statistics: remove references to Lucid from scripts 474/head
authorHannu Nyman <hannu.nyman@iki.fi>
Sun, 30 Aug 2015 11:00:29 +0000 (14:00 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Tue, 15 Sep 2015 07:22:58 +0000 (10:22 +0300)
Both init.d and uci-defaults scripts included in luci-app-statistics
still contained stuff related to lucid, which package was removed by
https://github.com/openwrt/luci/commit/91b97bc9f625d09431dc1c753209a037d7c42fbc

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>
(cherry picked from commit 0d5070c51089deb448476f1abadcea8e185eaf9b)

applications/luci-app-statistics/root/etc/init.d/luci_statistics
applications/luci-app-statistics/root/etc/uci-defaults/luci-statistics

index 936f3a63c37aab08588f7c3966fe296a0ee67ee7..ab75b69df0c33d2c9de9e506b5091da0357068f0 100755 (executable)
@@ -3,23 +3,15 @@ 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
-       mkdir -p /var/etc
        /usr/bin/stat-genconfig > /var/etc/collectd.conf
 
-       ### prepare rrdimg directory
-       if [ -f /etc/config/lucid ] && [ -x /etc/init.d/lucid ] && /etc/init.d/lucid enabled && \
-          [ "$(uci get luci_statistics.rrdtool.image_path 2>/dev/null)" != "$(uci get lucid.statistics.physical 2>/dev/null)" ]; then
-               uci set lucid.statistics.physical=$(uci get luci_statistics.rrdtool.image_path)
-               uci commit lucid
-               /etc/init.d/lucid restart
-       fi
-
        ### workaround broken permissions on /tmp
        chmod 1777 /tmp
 }
index e94a8637c853711af203cce93c1c54f83b9a0d88..28e35298a26071ca4ad93fc5af5ef581b0a6e4f5 100755 (executable)
@@ -8,29 +8,9 @@ uci -q batch <<-EOF >/dev/null
        commit ucitrack
 EOF
 
-# register LuCId virtual path handler
-[ -f /etc/config/lucid ] && \
-uci -q batch <<-EOF >/dev/null
-       delete lucid.statistics
-
-       set lucid.statistics=DirectoryPublisher
-       set lucid.statistics.name='RRDTool Image Cache'
-       set lucid.statistics.physical=/tmp/rrdimg
-       set lucid.statistics.virtual=/rrdimg
-       set lucid.statistics.domain=''
-
-       add_list lucid.http.publisher=statistics
-       add_list lucid.https.publisher=statistics
-
-       commit lucid
-EOF
-
 # symlink for busybox httpd
 [ -x /usr/sbin/httpd ] && [ ! -h /www/rrdimg ] && \
        ln -s /tmp/rrdimg /www/rrdimg
 
-# restart LuCId service
-[ -x /etc/init.d/lucid ] && /etc/init.d/lucid enabled && /etc/init.d/lucid restart
-
 rm -f /tmp/luci-indexcache
 exit 0