Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


automatic_updates_with_reboot

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
automatic_updates_with_reboot [2014/01/15 15:41] adminautomatic_updates_with_reboot [2014/01/15 15:46] admin
Line 1: Line 1:
 =====Automatic updates with yum-cron and reboot if necessary===== =====Automatic updates with yum-cron and reboot if necessary=====
- 
 My repo server syncs the repositories between 13:00 and 16:00 local time. It will reboot at 06:00 if a kernel update has been installed. My repo server syncs the repositories between 13:00 and 16:00 local time. It will reboot at 06:00 if a kernel update has been installed.
  
Line 10: Line 9:
  
 ===Configure yum-cron=== ===Configure yum-cron===
-/etc/sysconfig/yum-cron+  vi /etc/sysconfig/yum-cron
 <code>YUM_PARAMETER= <code>YUM_PARAMETER=
 CHECK_ONLY=no CHECK_ONLY=no
Line 22: Line 21:
  
 ===Add reboot script=== ===Add reboot script===
-/etc/cron.daily/1new-kernel-reboot+The yum-cron script /etc/cron.daily/0yum.cron will start before the reboot script /etc/cron.daily/1new-kernel-reboot because of the sorting. 
 +  vi /etc/cron.daily/1new-kernel-reboot
 <code>#!/bin/bash <code>#!/bin/bash
 entry=`cat /boot/grub/grub.conf | grep '^default' | cut -d '=' -f2` entry=`cat /boot/grub/grub.conf | grep '^default' | cut -d '=' -f2`
automatic_updates_with_reboot.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1