Skip to content
Snippets Groups Projects
Commit e65a9a29 authored by Nicolas KAROLAK's avatar Nicolas KAROLAK
Browse files

fix(ntp): use `pool` instead of `server` directive

parent db8d9a89
No related branches found
No related tags found
No related merge requests found
......@@ -9,9 +9,9 @@ def setup(interactive=True):
if utils.get_conf('NTP_SERVER'):
for server in utils.get_conf('NTP_SERVER').split(','):
if server.strip():
servers += 'server %s\n' % server.strip()
servers += 'pool %s\n' % server.strip()
if not servers:
servers = 'server ntp.ubuntu.com\n'
servers = 'pool ntp.ubuntu.com\n'
cmds = [
# NTP
'DEBIAN_FRONTEND=noninteractive apt-get install -y ntp',
......@@ -19,6 +19,6 @@ def setup(interactive=True):
dict(line='write', template='%s/ntp.conf' % dir_path, target='/etc/ntp.conf', params=(
('{{ servers }}', servers),
)),
'service ntp restart',
'systemctl restart ntp.service',
]
utils.run_commands(cmds)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment