def start_ntpmon():
"""
Start the ntpmon daemon process.
If ntp is not installed, do nothing.
"""
if os.path.exists(ntp_conf):
hookenv.log(ntp_conf + ' present; enabling and starting ntpmon')
host.service_resume(service_name)
else:
hookenv.log(ntp_conf + ' not present; disabling ntpmon')
host.service_pause(service_name)
set_state('ntpmon.started')
评论列表
文章目录