diff options
Diffstat (limited to 'network/vnstat/README.SBo')
-rw-r--r-- | network/vnstat/README.SBo | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/network/vnstat/README.SBo b/network/vnstat/README.SBo new file mode 100644 index 0000000000000..31fc8fdf3d979 --- /dev/null +++ b/network/vnstat/README.SBo @@ -0,0 +1,21 @@ +To run vnstat from cron, add the following line to your crontab: + + 0-55/5 * * * * if [[ -x /usr/bin/vnstat && $(ls /var/lib/vnstat/ | wc -l) -ge 1 ]]; then /usr/bin/vnstat -u; fi + +To run vnstat from /etc/rc.d: + chmod +x /etc/rc.d/rc.vnstat + +Note that to have vnstat start automatically this way it should be +called from rc.local (and optionally rc.local_shutdown) like so: + + In rc.local: + # Start vnstat + if [ -x /etc/rc.d/rc.vnstat ]; then + /etc/rc.d/rc.vnstat start + fi + + In rc.local_shutdown: + # Stop vnstat + if [ -x /etc/rc.d/rc.vnstat ]; then + /etc/rc.d/rc.vnstat stop + fi |