We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6bd0097 + 0436a20 commit c9940b5Copy full SHA for c9940b5
1 file changed
docker-time-sync-agent/update-docker-time
@@ -6,4 +6,4 @@
6
# Created by ArunvelSriram on 26/12/16.
7
# Copyright © 2016 ArunvelSriram. All rights reserved.
8
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 }'`
+/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