#!/bin/bash

#DESC Configures, starts, and enables chrony time sync.

yum -y install chrony
[ "$?" != "0" ] && echo "Could not install chrony." && exit 1

[ "`grep rhel.pool /etc/chrony.conf`" == "" ] && echo "pool 2.rhel.pool.ntp.org iburst" >>/etc/chrony.conf && systemctl restart chronyd
systemctl enable chronyd

exit 0
