Skip to content

Commit 0259313

Browse files
aledbfcarmstrong
authored andcommitted
feat(user-data): enable time synchronization on startup
1 parent c23464a commit 0259313

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

contrib/coreos/user-data.example

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@ coreos:
4141
[Service]
4242
Type=oneshot
4343
ExecStart=/usr/bin/sh -c 'curl -sSL --retry 5 --retry-delay 2 http://deis.io/deisctl/install.sh | sh -s 1.0.2'
44+
- name: ntpd.service
45+
command: start
46+
- name: ntpdate.service
47+
command: start
48+
- name: enable-ntp-synchronization.service
49+
command: start
50+
content: |
51+
[Unit]
52+
Description=Synchronize system clock
53+
Before=ntpd.service
54+
55+
[Service]
56+
ExecStart=/usr/bin/timedatectl set-timezone UTC
57+
ExecStart=/usr/bin/timedatectl set-ntp true
58+
ExecStart=/sbin/hwclock --systohc
59+
RemainAfterExit=yes
60+
Type=oneshot
61+
62+
[Install]
63+
WantedBy=multi-user.target
4464
write_files:
4565
- path: /etc/deis-release
4666
content: |

0 commit comments

Comments
 (0)