Skip to content

Commit e0e9b71

Browse files
committed
Merge pull request #2596 from carmstrong/pr-2563
feat(contrib/coreos): enable time synchronization on startup
2 parents c23464a + 461dea7 commit e0e9b71

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

contrib/coreos/user-data.example

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,21 @@ 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: ntpdate.service
45+
command: start
46+
- name: timedate-ntp-synchronization.service
47+
command: start
48+
content: |
49+
[Unit]
50+
Description=Synchronize system clock
51+
After=ntpdate.service
52+
53+
[Service]
54+
ExecStart=/usr/bin/timedatectl set-timezone UTC
55+
ExecStart=/usr/bin/timedatectl set-ntp true
56+
ExecStart=/sbin/hwclock --systohc --utc
57+
RemainAfterExit=yes
58+
Type=oneshot
4459
write_files:
4560
- path: /etc/deis-release
4661
content: |

0 commit comments

Comments
 (0)