Commit 35e271cc authored by Tunahan Kaya's avatar Tunahan Kaya
Browse files

added option to deamon called --cleanrd that cleans the rootdir of the specific deamon

parent 1da7ece4
Pipeline #1632 passed with stages
in 17 minutes and 42 seconds
......@@ -444,6 +444,9 @@ parse_input(const po::variables_map& vm) {
auto rootdir_path = fs::path(rootdir) / fmt::format_int(getpid()).str();
#endif
if(vm.count("cleanrd")) {
fs::remove_all(rootdir_path.native());
}
GKFS_DATA->spdlogger()->debug("{}() Root directory: '{}'", __func__,
rootdir_path.native());
fs::create_directories(rootdir_path);
......@@ -511,6 +514,8 @@ main(int argc, const char* argv[]) {
"auto-sm",
"Enables intra-node communication (IPCs) via the `na+sm` (shared memory) protocol, "
"instead of using the RPC protocol. (Default off)");
desc.add_options()("cleanrd",
"Cleans Rootdir before launching the deamon.");
desc.add_options()("version", "Print version and exit.");
po::variables_map vm{};
po::store(po::parse_command_line(argc, argv, desc), vm);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment