summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/vnstat/files/vnstat.cron')
-rw-r--r--net-analyzer/vnstat/files/vnstat.cron11
1 files changed, 6 insertions, 5 deletions
diff --git a/net-analyzer/vnstat/files/vnstat.cron b/net-analyzer/vnstat/files/vnstat.cron
index 716405fe50c8..690681327688 100644
--- a/net-analyzer/vnstat/files/vnstat.cron
+++ b/net-analyzer/vnstat/files/vnstat.cron
@@ -1,8 +1,9 @@
#!/bin/bash
-# uncomment this line to enable this cron script
-exit 0
+# run vnstat if installed and at least one database exists
-if [ `ls /var/lib/vnstat/ | wc -l` -ge 1 ] ; then
- exec /usr/bin/vnstat -u
-fi
+# Uncomment the following to enable
+
+#if [ -x /usr/bin/vnstat ] && [ `ls /var/lib/vnstat/ | wc -l` -ge 1 ] ; then
+# exec /usr/bin/vnstat -u
+#fi