mirror of
https://github.com/rwinkhart/artix-install-script.git
synced 2026-08-27 20:36:26 -04:00
9 lines
251 B
Bash
9 lines
251 B
Bash
#!/bin/sh
|
|
old_timestamp="$(cat /etc/local.d/.ntpsync)"
|
|
new_timestamp="$(date +%s)"
|
|
if [ "$((new_timestamp-old_timestamp))" -gt 604800 ]; then
|
|
ntpdate -b pool.ntp.org
|
|
hwclock --systohc --utc
|
|
echo "$new_timestamp" > /etc/local.d/.ntpsync
|
|
fi
|