.
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled

This commit is contained in:
Your Name
2025-05-17 22:24:25 +12:00
parent 891f0d023f
commit 27f86e95e7
7 changed files with 221 additions and 12 deletions

View File

@ -23,25 +23,25 @@ namespace dropshell
uninstall_handler,
shared_commands::std_autocomplete_allowall,
false, // hidden
true, // requires_config
true, // requires_install
true, // requires_config
true, // requires_install
2, // min_args (after command)
2, // max_args (after command)
"uninstall SERVER SERVICE|all",
"Uninstall a service on a server. Does not remove configuration or user data.",
// heredoc
R"(
Uninstall a service on a server. Does not remove configuration or user data.
uninstall SERVER SERVICE uninstall the given service on the given server.
uninstall SERVER all uninstall all services on the given server.
Uninstall a service, leaving all configuration and data intact.
uninstall SERVER SERVICE Uninstall the given service on the given server.
uninstall SERVER all Uninstall all services on the given server.
Update and reinstall the service with install, or delete all configuration and data with nuke.
)"});
}
} uninstall_command_register;
bool uninstall_service(const std::string &server, const std::string &service, bool silent=false)
bool uninstall_service(const std::string &server, const std::string &service, bool silent = false)
{
if (!silent)
maketitle("Uninstalling " + service + " on " + server);
@ -81,7 +81,6 @@ namespace dropshell
return true;
}
int uninstall_handler(const CommandContext &ctx)
{
if (ctx.args.size() < 1)
@ -109,5 +108,4 @@ namespace dropshell
return uninstall_service(server, service) ? 0 : 1;
}
} // namespace dropshell