From 8fbd35b18d8f72e05a312cb7eead1ff8819e24c3 Mon Sep 17 00:00:00 2001 From: Mads Meisner-Jensen Date: Sat, 15 May 2021 15:04:49 +0200 Subject: [PATCH] rpi-4: add luci-stats-reset script When tinkering with luci-statistics/collectd and after changing RRD config values of /etc/config/luci_statistics and collectd, this script can be used to delete ALL collected statistics and restart luci-statistics and collectd --- configs/rpi-4-files/usr/bin/luci-stats-reset | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 configs/rpi-4-files/usr/bin/luci-stats-reset diff --git a/configs/rpi-4-files/usr/bin/luci-stats-reset b/configs/rpi-4-files/usr/bin/luci-stats-reset new file mode 100755 index 0000000..381302b --- /dev/null +++ b/configs/rpi-4-files/usr/bin/luci-stats-reset @@ -0,0 +1,11 @@ +#!/bin/sh +# Delete ALL collected statistics and restart luci-statistics and collectd +# Useful after changing RRD config values of /etc/config/luci_statistics + +/etc/init.d/luci_statistics stop +/etc/init.d/collectd stop + +rm -rf /tmp/collectd.conf /tmp/rrd/* + +/etc/init.d/collectd start +/etc/init.d/luci_statistics start