Updated on 2023-04-19 GMT+08:00

Automatic Update Using osmt-agent

The osmt-agent service periodically checks whether there are available RPM package updates and updates them automatically. You can configure how often to check updates and when to perform the update.

  1. Run the following command to ensure that the value of auto_upgrade in the osmt.conf file is True:

    osmt config -k auto_upgrade -v True

  2. Run systemctl status osmt-agent.service to check whether the osmt-agent service is started.
    • If the Active value is active (running), osmt-agent is started.
    • Otherwise, run systemctl start osmt-agent.service to start osmt-agent.

  3. Run the desired command to configure when or how often to perform the updates:
    • To configure a time window for automatic updates:

      osmt config -k auto_upgrade_window -v "auto_upgrade_window"

      auto_upgrade_window: defines the start time and end time of automatic updates using the osmt-agent service. The value is in the format of "HH:MM-HH:MM".

      If the end time is smaller than the start time, the update period covers two dates. For example, 22:00-05:00 indicates an update period from 22:00 on the current day to 05:00 on the next day.

      For example, run the following command to configure a time window starting from 23:00 on the current day to 01:00 on the next day:

      osmt config -k auto_upgrade_window -v "23:00-01:00"

    • To configure the interval between two automatic updates:

      osmt config -k auto_upgrade_interval -v auto_upgrade_interval

      auto_upgrade_interval: defines the minimum interval between two automatic updates, in days.

      For example, run the following command to configure automatic updates every other day:

      osmt config -k auto_upgrade_interval -v 1