How to use input.restart_action when executing InstallMissingPatches with macOS Software Update?
This article is applied to MetaDefender Endpoint Security SDK (OESIS) from version 4.3.4105.0 and later releases deployed on MacOS systems.
Problem
The InstallMissingPatches
method in MetaDefender Endpoint Security SDK’s Software Update module on macOS initiates the patch installation process and may automatically trigger a system restart without user confirmation.
This behavior occurs because our SDK relies on macOS’s native update mechanism, which determines whether a restart is required based on the type of patch being applied. As a result, the system may reboot automatically for certain updates, depending on macOS’s default behavior.
Solution
Starting with SDK build version 4.3.4105.0, we introduced a new input flag for InstallMissingPatches
to control the restart behavior of macOS:
Field Name:
input.restart_action
Field Type:
number
Description: Specifies the system restart behavior during macOS patch installation.
Behavior:
If
restart_action
is omitted or the value is0
(default behavior):- The update will be downloaded and macOS will restart automatically to install the patches (if required).
- The system may restart multiple times during the update process.
If
restart_action
is set to1
:- The update will be downloaded but will not trigger an automatic restart.
- The system will wait for the user to manually initiate the restart via the Software Update UI.
Usage Example
{
"input": {
"signature": 100192,
"method": 1014,
"restart_action": 1,
"patches": [
{
"title": "macOS Sequoia 15.4-24E248",
"product": "macOS Sequoia",
"vendor": "Apple Inc."
}
]
}
}
Why is the applied patch still shown in GetMissingPatches?
If the system isn't restarted after applying a patch, the patch may still appear in GetMissingPatches
, as certain updates require a reboot to complete. Others may install fully without restarting and won’t reappear.
To complete installation for patches that need a reboot, you can restart macOS using one of two methods:
Option 1: Invoke InstallMissingPatches without restart_action
Invoke InstallMissingPatches
without input.restart_action
parameter, or with input.restart_action = 0
. It will restart immediately to install the macOS update.
Option 2: Manually restart to install the macOS update
Open Settings → Software Update → select the missing patch, then click the Restart Now button.
If further assistance is required, please proceed to log a support case or chatting with our support engineer.