summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phosphor-rsyslog-config/server-conf.cpp7
-rw-r--r--phosphor-rsyslog-config/server-conf.hpp4
2 files changed, 10 insertions, 1 deletions
diff --git a/phosphor-rsyslog-config/server-conf.cpp b/phosphor-rsyslog-config/server-conf.cpp
index 0b5bc62..4bf8c79 100644
--- a/phosphor-rsyslog-config/server-conf.cpp
+++ b/phosphor-rsyslog-config/server-conf.cpp
@@ -105,7 +105,7 @@ void Server::writeConfig(
stream << "#*.* @@remote-host:port";
}
- utils::restart();
+ restart();
}
bool Server::addressValid(const std::string& address)
@@ -150,5 +150,10 @@ void Server::restore(const char* filePath)
}
}
+void Server::restart()
+{
+ utils::restart();
+}
+
} // namespace rsyslog_config
} // namespace phosphor
diff --git a/phosphor-rsyslog-config/server-conf.hpp b/phosphor-rsyslog-config/server-conf.hpp
index 0f67f30..edab113 100644
--- a/phosphor-rsyslog-config/server-conf.hpp
+++ b/phosphor-rsyslog-config/server-conf.hpp
@@ -69,6 +69,10 @@ class Server : public Iface
*/
virtual uint16_t port(uint16_t value) override;
+ /** @brief Restart rsyslog's systemd unit
+ */
+ virtual void restart();
+
private:
/** @brief Update remote server address and port in
* rsyslog config file.
OpenPOWER on IntegriCloud