<commit_before>
## Install

The installation respect the procedure published on [cyberciti][cyberciti]. The
"ntp" server is installed as a startup service and `ntpdate` is run a first
time when the `ntpd` daemon isnt yet started.

    module.exports = header: 'NTP Install', timeout: -1, handler: ->
      {ntp} = @config
      @service
        header: 'Package'
        name: 'ntp'
        chk_name: 'ntpd'
        startup: true
        code_stopped: [1, 3]
      # Note, no NTPD server may be available yet, no solution at the moment
      # to wait for an available NTPD server
      @execute
        header: 'Synchronize'
        cmd: "ntpdate #{ntp.servers[0]}"
        # retry: 20
        # wait: 3000
        if: ->
          @status(-1) and ntp.servers?.length and ( ntp.servers[0] isnt @config.host )

## Configure

The configuration file "/etc/ntp.conf" is updated with the list of servers
defined by the "ntp.servers" property. The "ntp" service is restarted if any
change to this file is detected.
The "fudge" property is used when a server should trust its own BIOS clock.
It should only be used in a pure offline configuration,
and when only ONE ntp server is configured

      @call header: 'Configure', handler: (_, callback) ->
        servers = ntp.servers.slice 0
        return callback() unless servers?.length
        if @config.host in servers<commit_msg>ntp: rehabilitate wait and retry<commit_after>
## Install

The installation respect the procedure published on [cyberciti][cyberciti]. The
"ntp" server is installed as a startup service and `ntpdate` is run a first
time when the `ntpd` daemon isnt yet started.

    module.exports = header: 'NTP Install', timeout: -1, handler: ->
      {ntp} = @config
      @service
        header: 'Package'
        name: 'ntp'
        chk_name: 'ntpd'
        startup: true
        code_stopped: [1, 3]
      # Note, no NTPD server may be available yet, no solution at the moment
      # to wait for an available NTPD server
      @execute
        header: 'Synchronize'
        cmd: "ntpdate #{ntp.servers[0]}"
        retry: 20
        wait: 3000
        if: ->
          @status(-1) and ntp.servers?.length and ( ntp.servers[0] isnt @config.host )

## Configure

The configuration file "/etc/ntp.conf" is updated with the list of servers
defined by the "ntp.servers" property. The "ntp" service is restarted if any
change to this file is detected.
The "fudge" property is used when a server should trust its own BIOS clock.
It should only be used in a pure offline configuration,
and when only ONE ntp server is configured

      @call header: 'Configure', handler: (_, callback) ->
        servers = ntp.servers.slice 0
        return callback() unless servers?.length
        if @config.host in servers
{'fraction_non_alphanumeric': 0.08913749548899315, 'fraction_numerical': 0.009382894261999277, 'mean_word_length': 2.7611940298507465, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7557810', 'n_tokens_mistral': 829, 'n_tokens_neox': 815, 'n_words': 343}