Commit Graph

4 Commits

Author SHA1 Message Date
Martin Blumenstingl 96ae89c801 net/vnstat: enable auto-respawn when vnstatd crashes
Originally this was indended as a fix for devices without RTC support
which do not have the correct time set after a reboot (until ntp is able
to update the system time). vnstat checks if there is a time difference
between the latest entry in the database and detects that the system time
is incorrect. In this case vnstat does not start (to prevent database
corruption), the following message is reported instead:
'Error: Interface "..." has previous update date too much in the future,
exiting.'
Once we have network connectivity (and ntp has updated the system time)
vnstat starts correctly though.
vnstat 1.18 fixes this by waiting a few minutes (instead of exiting) and
the following message is logged:
"Latest database update is in the future (db: 2018-04-28 08:39:11 > now:
2018-04-28 08:07:18). Giving the system clock up to 5 minutes to sync
before continuing."

This still adds a procd respawn trigger to let procd automatically
restart vnstat in case:
- vnstat it crashes
- no valid system time is received for a long time (no network
  connectivity, broken NTP servers, ...)

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2018-05-31 13:03:38 +02:00
Martin Blumenstingl e1acbd55b6 net/vnstat: port the init-script to procd
This ports the init-script from the legacy functions to procd. There
should be no functional changes with this patch.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2018-05-31 13:03:38 +02:00
Mathias Kresin c5eda035cd vnstat: allow to restore backup from directory
Allow to restore a backup from a directory instead of an url on start.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-06-01 21:09:20 +02:00
Jo-Philipp Wich 177bfef1c7 vnstat: import from packages, add myself as maintainer
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2014-06-11 16:47:32 +02:00