Application Framework Reference

App Server Utilities API

check_restart_required()

The check_restart_required() function indicates if splunkd raised the restart flag as a result of configuration changes. Use this function to detect if changes made by a controller require a splunkd restart to be enabled.

Synopsis

restartF = check_restart_required()

Return Value

String

Restart flag status:

True = Restart required flag is set.

False = Restart required flag is reset.

Example

from splunk.appserver.mrsparkle.lib import util
template_args = {
    ... elided ...
    'requires_restart': util.check_restart_required()
}

return self.render_template('/licensing/self.html', template_args)