Well the code is not very self explaining. I'll rework it a bit to make it more readable asap, but le me explain what it's aiming to do: RaOperationUtil.installRaServicesAndDeployFromModule create services for rar deployed as module. This service require an explicit activation (:activate command from CLI) when a configuration is added. In case of boot time both operation need to be executed, and this "restart" service is exactly activating configuration on previous installed service.
As said I'll rework a bit the code to make it more readable (at least w/ some comments).
Thanks to point it out.