Skip to content

Commit c9940b5

Browse files
Merge pull request #3 from CvX/ntp-fallback
Fallback to pool.ntp.org if NTP isn't configured
2 parents 6bd0097 + 0436a20 commit c9940b5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docker-time-sync-agent/update-docker-time

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Created by ArunvelSriram on 26/12/16.
77
# Copyright © 2016 ArunvelSriram. All rights reserved.
88

9-
/usr/local/bin/docker run --rm --privileged --pid=host walkerlee/nsenter -t 1 -m -u -i -n ntpd -d -q -n -p `cat /etc/ntp.conf | awk '{ print $2 }'`
9+
/usr/local/bin/docker run --rm --privileged --pid=host walkerlee/nsenter -t 1 -m -u -i -n ntpd -d -q -n -p `if [[ -f /etc/ntp.conf ]]; then cat /etc/ntp.conf | awk '{ print $2 }'; else echo 'pool.ntp.org'; fi`

0 commit comments

Comments
 (0)