Posted: Sat Jan 30, 2021 15:42 Post subject: Scripts to keep Date and logs between reboots
Thought I'd share a couple of script commands that I use to carry over the date and logs between reboots, they require the permenat storage such as jffs. I carry over the date in the rare case ntp doesn't work.
Startup Script
Code:
date +%s -s @$(awk '(getline a <"/proc/uptime") <= 0 {exit}; {printf ($0 + ("%f"a/1000))}' /jffs/date.old