Classes | |
| struct | CommandResult |
Functions | |
| bool | executableExists (const char *path) noexcept |
| std::string | firstExecutable (std::initializer_list< const char * > candidates) |
| CommandResult | runCommand (const std::vector< std::string > &arguments) noexcept |
| bool | startsWithPath (const std::filesystem::path &path, const std::filesystem::path &prefix) noexcept |
| bool | isSystemdUnitExtension (const std::string &extension) |
| std::optional< std::string > | systemdUnitName (const std::filesystem::path &path) |
| ServiceActionResult | resultFrom (const std::string &operation, const ServiceTarget &target, const std::vector< CommandResult > &results) |
|
noexcept |
Definition at line 21 of file SystemServiceControl.cpp.
References executableExists().
Referenced by executableExists(), and firstExecutable().
| std::string bastionguard::rootguard::anonymous_namespace{SystemServiceControl.cpp}::firstExecutable | ( | std::initializer_list< const char * > | candidates | ) |
Definition at line 26 of file SystemServiceControl.cpp.
References executableExists(), and firstExecutable().
Referenced by firstExecutable().
| bool bastionguard::rootguard::anonymous_namespace{SystemServiceControl.cpp}::isSystemdUnitExtension | ( | const std::string & | extension | ) |
Definition at line 105 of file SystemServiceControl.cpp.
References isSystemdUnitExtension().
Referenced by isSystemdUnitExtension(), and systemdUnitName().
| ServiceActionResult bastionguard::rootguard::anonymous_namespace{SystemServiceControl.cpp}::resultFrom | ( | const std::string & | operation, |
| const ServiceTarget & | target, | ||
| const std::vector< CommandResult > & | results ) |
Definition at line 130 of file SystemServiceControl.cpp.
References bastionguard::rootguard::ServiceTarget::init, bastionguard::rootguard::ServiceTarget::name, resultFrom(), and bastionguard::rootguard::toString().
Referenced by resultFrom().
|
noexcept |
Definition at line 35 of file SystemServiceControl.cpp.
References bastionguard::rootguard::anonymous_namespace{SystemServiceControl.cpp}::CommandResult::exitCode, bastionguard::rootguard::anonymous_namespace{SystemServiceControl.cpp}::CommandResult::output, and runCommand().
Referenced by runCommand().
|
noexcept |
Definition at line 91 of file SystemServiceControl.cpp.
References startsWithPath().
Referenced by startsWithPath().
| std::optional< std::string > bastionguard::rootguard::anonymous_namespace{SystemServiceControl.cpp}::systemdUnitName | ( | const std::filesystem::path & | path | ) |
Definition at line 113 of file SystemServiceControl.cpp.
References isSystemdUnitExtension(), and systemdUnitName().
Referenced by systemdUnitName().