dropshell release 2025.0527.2201
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 2m44s
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 2m44s
This commit is contained in:
@@ -130,6 +130,28 @@ int edit_server(const std::string &server_name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void list_directory(std::string dir, std::string msg)
|
||||
{
|
||||
bool first=true;
|
||||
std::vector<std::string> directories;
|
||||
for (const auto &file : std::filesystem::directory_iterator(dir))
|
||||
{
|
||||
if (first)
|
||||
{
|
||||
if (!msg.empty())
|
||||
info << msg << std::endl;
|
||||
first=false;
|
||||
}
|
||||
if (std::filesystem::is_directory(file.path()))
|
||||
directories.push_back(file.path());
|
||||
else
|
||||
info << " " << file.path() << std::endl;
|
||||
}
|
||||
|
||||
for (const auto &dir : directories)
|
||||
list_directory(dir, "");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// edit service config
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -143,7 +165,14 @@ int edit_service_config(const std::string &server, const std::string &service)
|
||||
}
|
||||
|
||||
if (edit_file(config_file, true) && std::filesystem::exists(config_file))
|
||||
info << "To apply your changes, run:\n dropshell install " + server + " " + service << std::endl;
|
||||
info << "Successfully edited service config file at " << config_file << std::endl;
|
||||
|
||||
std::string service_dir = localpath::service(server, service);
|
||||
list_directory(service_dir, "You may wish to edit the other files in " + service_dir);
|
||||
|
||||
info << "Then to apply your changes, run:" << std::endl;
|
||||
info << " dropshell uninstall " + server + " " + service << std::endl;
|
||||
info << " dropshell install " + server + " " + service << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user