OS: allow set NTP (#252)

* OS: allow set NTP

* Create etc-systemd-timesyncd.conf.mount

* Update hassos-config

* Update configuration.md

* add link

* Update Documentation/configuration.md

Co-Authored-By: pvizeli <pascal.vizeli@syshack.ch>
This commit is contained in:
Pascal Vizeli
2018-11-21 00:28:40 +01:00
committed by GitHub
parent 2435ca9065
commit dc35208efe
5 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1 @@
/usr/lib/systemd/system/etc-systemd-timesyncd.conf.mount

View File

@@ -0,0 +1 @@
C /mnt/overlay/etc/systemd/timesyncd.conf - - - - /etc/systemd/timesyncd.conf

View File

@@ -0,0 +1,14 @@
[Unit]
Description=Timesyncd persistent configuration
Requires=mnt-overlay.mount
After=mnt-overlay.mount systemd-tmpfiles-setup.service
Before=systemd-timesyncd.service
[Mount]
What=/mnt/overlay/etc/systemd/timesyncd.conf
Where=/etc/systemd/timesyncd.conf
Type=none
Options=bind
[Install]
WantedBy=hassos-bind.target

View File

@@ -75,6 +75,15 @@ else
systemctl stop dropbear > /dev/null 2>&1
fi
##
# timesyncd
if [ -f "${CONFIG_DIR}/timesyncd.conf" ]; then
echo "[Info] Update timesyncd config"
cat "${CONFIG_DIR}/timesyncd.conf" > /etc/systemd/timesyncd.conf
systemctl restart systemd-timesyncd.service > /dev/null 2>&1
fi
##
# Firmware update / Only USB
UPTIME=$(awk '{printf "%0.f", $1}' /proc/uptime)