1 #include "health_utils.hpp"
2 
3 #include <phosphor-logging/lg2.hpp>
4 
5 PHOSPHOR_LOG2_USING;
6 
7 namespace phosphor::health::utils
8 {
9 
10 void startUnit(sdbusplus::bus_t& bus, const std::string& sysdUnit)
11 {
12     if (sysdUnit.empty())
13     {
14         return;
15     }
16     sdbusplus::message_t msg = bus.new_method_call(
17         "org.freedesktop.systemd1", "/org/freedesktop/systemd1",
18         "org.freedesktop.systemd1.Manager", "StartUnit");
19     msg.append(sysdUnit, "replace");
20     bus.call_noreply(msg);
21 }
22 
23 } // namespace phosphor::health::utils
24