if [ ! -f "/etc/yum/yum-cron.conf" ]; then
yum -y install cronie yum-cron
sed -i 's/apply_updates = no/apply_updates = yes/g' /etc/yum/yum-cron.conf
systemctl start crond
systemctl start yum-cron
fi
echo 系统自动更新已开启！