dropshell release 2025.0601.1821
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled
This commit is contained in:
@@ -103,6 +103,11 @@ namespace dropshell
|
||||
if (server_name.empty() || template_name.empty() || service_name.empty())
|
||||
return false;
|
||||
|
||||
if (!legal_service_name(service_name)) {
|
||||
error << "Service name contains illegal characters: " << service_name << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
ServerConfig server_info(server_name);
|
||||
if (!server_info.is_valid())
|
||||
{
|
||||
|
@@ -94,11 +94,11 @@ int edit_config()
|
||||
|
||||
std::string config_file = localfile::dropshell_json();
|
||||
if (!edit_file(config_file, false) || !std::filesystem::exists(config_file))
|
||||
return die("Failed to edit config file.");
|
||||
return return_die("Failed to edit config file.");
|
||||
|
||||
gConfig().load_config();
|
||||
if (!gConfig().is_config_set())
|
||||
return die("Failed to load and parse edited config file!");
|
||||
return return_die("Failed to load and parse edited config file!");
|
||||
|
||||
gConfig().save_config(true);
|
||||
|
||||
|
@@ -61,6 +61,12 @@ namespace dropshell
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!legal_service_name(service))
|
||||
{
|
||||
error << "Service name contains illegal characters: " << service << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
LocalServiceInfo sinfo = get_service_info(server, service);
|
||||
if (!SIvalid(sinfo))
|
||||
{
|
||||
|
@@ -51,6 +51,12 @@ namespace dropshell
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!legal_service_name(service))
|
||||
{
|
||||
error << "Service name contains illegal characters: " << service << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// run the start script.
|
||||
bool started = server_env.run_remote_template_command(service, "start", {}, false, {});
|
||||
|
||||
|
@@ -51,6 +51,12 @@ namespace dropshell
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!legal_service_name(service))
|
||||
{
|
||||
error << "Service name contains illegal characters: " << service << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// run the stop script.
|
||||
bool stopped = server_env.run_remote_template_command(service, "stop", {}, false, {});
|
||||
|
||||
|
Reference in New Issue
Block a user