#!/bin/bash | |
TIMESTAMP_FILE=/var/lib/systemd/clock | |
PROGNAME=$(basename $(readlink -f $0)) | |
systemctl stop systemd-timesyncd | |
date --set="$(stat /lost+found |grep Change |sed -e 's/^Change: //g' -e 's/+0000//g')" | |
hwclock --systohc | |
rm -f $TIMESTAMP_FILE | |
touch $TIMESTAMP_FILE | |
systemctl start systemd-timesyncd | |