mirror of
https://github.com/OpenVoiceOS/OpenVoiceOS
synced 2025-06-05 22:19:21 +02:00
MycroftOS: More timesync changes.
This commit is contained in:
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
case "$2" in
|
||||
up)
|
||||
timedatectl set-timezone "$(curl --fail https://ipapi.co/timezone)"
|
||||
;;
|
||||
esac
|
@ -0,0 +1,20 @@
|
||||
#! /usr/bin/bash
|
||||
|
||||
[ -n "$CONNECTION_UUID" ] || exit
|
||||
|
||||
INTERFACE=$1
|
||||
ACTION=$2
|
||||
|
||||
case $ACTION in
|
||||
up | dhcp4-change | dhcp6-change)
|
||||
[ -n "$DHCP4_NTP_SERVERS" ] || exit
|
||||
exec > /etc/systemd/timesyncd.conf.d/$CONNECTION_UUID.conf
|
||||
echo "[Time]"
|
||||
echo "NTP=$DHCP4_NTP_SERVERS"
|
||||
systemctl restart systemd-timesyncd
|
||||
;;
|
||||
down)
|
||||
rm -f /etc/systemd/timesyncd.conf.d/$CONNECTION_UUID.conf
|
||||
systemctl restart systemd-timesyncd
|
||||
;;
|
||||
esac
|
@ -1,6 +0,0 @@
|
||||
[Match]
|
||||
Name=eth0
|
||||
[Network]
|
||||
DHCP=ipv4
|
||||
[DHCP]
|
||||
RouteMetric=10
|
@ -0,0 +1,3 @@
|
||||
[Time]
|
||||
NTP=time.cloudflare.com
|
||||
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org
|
Reference in New Issue
Block a user