aboutsummaryrefslogtreecommitdiff
path: root/src/zenutil/service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenutil/service.cpp')
-rw-r--r--src/zenutil/service.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/zenutil/service.cpp b/src/zenutil/service.cpp
index ea7c2aae6..a2ff93efd 100644
--- a/src/zenutil/service.cpp
+++ b/src/zenutil/service.cpp
@@ -884,14 +884,14 @@ InstallService(std::string_view ServiceName, const ServiceSpec& Spec)
{
const std::string UnitName = GetUnitName(ServiceName);
const std::filesystem::path ServiceUnitPath = GetServiceUnitPath(UnitName);
- std::string UserName = Spec.UserName;
+ std::string UserName = Spec.UserName;
if (UserName == "")
{
std::pair<int, std::string> UserResult = ExecuteProgram("echo $SUDO_USER");
if (UserResult.first != 0 || UserResult.second.empty())
{
- ZEN_ERROR("Unable to determine current user");
+ ZEN_ERROR("Unable to determine current user");
return MakeErrorCode(UserResult.first);
}
@@ -984,14 +984,14 @@ QueryInstalledService(std::string_view ServiceName, ServiceInfo& OutInfo)
std::pair<int, std::string> ShowResult = ExecuteProgram(fmt::format("systemctl show -p ExecStart {}", UnitName));
if (ShowResult.first == 0)
{
- std::regex Regex(R"~(ExecStart=\{ path=(.*?) ; argv\[\]=(.*?) ;)~");
+ std::regex Regex(R"~(ExecStart=\{ path=(.*?) ; argv\[\]=(.*?) ;)~");
std::smatch Match;
if (std::regex_search(ShowResult.second, Match, Regex))
{
- std::string Executable = Match[1].str();
- std::string CommandLine = Match[2].str();
- OutInfo.Spec.ExecutablePath = Executable;
+ std::string Executable = Match[1].str();
+ std::string CommandLine = Match[2].str();
+ OutInfo.Spec.ExecutablePath = Executable;
OutInfo.Spec.CommandLineOptions = CommandLine.substr(Executable.size(), CommandLine.size());
}
else