Ages ago I did this post which contained a script I wrote for my router. Well I just updated it a little bit, by changing the WAN-Up script. Basically I realised there was a small flaw: the WAN-Up script (which restores the backed up stats to the router) doesn’t just run when the router is first powered on, it runs every time a connection to the internet is established. So, as well as running when the router first starts up, it may also run if the router loses the internet connection at some point then reconnects. This happens occasionally with my internet connection and it would mean I might lose up to an hour’s worth of stats, as the backup made on the hour would be restored, overwriting what had happened between then and the connection being lost. I noticed this problem quite quickly, but it didn’t bother me too much so I’ve only just got around to fixing it. All I had to do was put what I had before into an
if statement, I should have done it ages ago.