Welcome to Centmin Mod Community
Become a Member

Beta Branch add optional NEEDRESTART_CHECK to MOTD in 130.00beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Sep 21, 2023.

  1. eva2000

    eva2000 Administrator Staff Member

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,671
    Local Time:
    5:45 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    add optional NEEDRESTART_CHECK to MOTD in 130.00beta01

    - add NEEDRESTART_CHECK='n' variable support in SSH login's MOTD (message of the day). Disabled by default. When set to NEEDRESTART_CHECK='y' in the persistent config file /etc/centminmod/custom_config.inc, when you log into server, it will run needs-restarting command only on Friday, Saturday and Sunday to check if any YUM updates require or recommend a server reboot and alert the user on SSH login. Not all YUM updates require server reboot Identify packages that will require a system reboot after an update - Red Hat Customer Portal
    - run cmupdate command to update your local code for this update
    - Example message on CentOS 7 when SSH login with NEEDRESTART_CHECK='y' set. Centmin Mod modifies the message to add additional commands to run before rebooting server to ensure you do not corrupt your MySQL data and to recommend you schedule a time for server reboot


    Code (Text):
    Core libraries or services have been updated:
      kernel -> 3.10.0-1160.92.1.el7
      kernel -> 3.10.0-1160.83.1.el7
      kernel -> 3.10.0-1160.95.1.el7
      openssl-libs -> 1:1.0.2k-26.el7_9
      kernel -> 3.10.0-1160.90.1.el7
    
    Server Reboot is required to ensure that your system benefits from these updates.
    
    More information:
    https://access.redhat.com/solutions/27943
    
    Rather than reboot server for each YUM update, you can schedule a specific time
      i.e. on weekends
    
    To ensure all MySQL data in memory buffers is written to disk before reboot
    Run this command & wait 180 seconds before rebooting server:
      mysqladmin flush-tables && sleep 180


    Continue reading...

    130.00beta01 branch

    Support Centmin Mod


    If you find Centmin Mod useful, please help support Centmin Mod