From e62f5ca6164a3504fff4e7536da86bff46772405 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 29 Aug 2014 17:56:38 +0200 Subject: just run if ntpd is not running --- 50-ntpdate | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '50-ntpdate') diff --git a/50-ntpdate b/50-ntpdate index 4e7d89d..5cb9850 100644 --- a/50-ntpdate +++ b/50-ntpdate @@ -4,7 +4,9 @@ case "${reason}" in BOUND|REBIND|REBOOT|RENEW|TIMEOUT|STATIC) # sync time as soon as connection is up # this reads nameserver from /etc/ntp.conf - ntpd --quit --panicgate + if ! pidof ntpd >/dev/null; then + ntpd --quit --panicgate + fi # alternatively use ntpdate and give hostname #ntpdate -u pool.ntp.org ;; -- cgit v1.2.3-54-g00ecf