0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ntpdの起動

Posted at

ntpdを起動するときにはntpdateが正常に処理できた後に起動する必要があります。停電の復旧などでネットワークの準備が出来てない場合などを考慮して、スクリプトで実行する場合、下記のようにします。

#!/bin/sh

while :
do
        ntpdate ntp.nict.jp
        if [ $? == 0 ]; then
                break
        fi
        sleep 30
done

ntpd -p /var/run/ntpd.pid
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?