This commit is contained in:
@ -4,6 +4,8 @@
|
||||
#include "templates.hpp"
|
||||
|
||||
#include "utils/assert.hpp"
|
||||
#include "utils/utils.hpp"
|
||||
#include "services.hpp"
|
||||
|
||||
namespace dropshell
|
||||
{
|
||||
@ -19,7 +21,7 @@ namespace dropshell
|
||||
{
|
||||
CommandRegistry::instance().register_command({uninstall_name_list,
|
||||
uninstall_handler,
|
||||
std_autocomplete_allowall,
|
||||
shared_commands::std_autocomplete_allowall,
|
||||
false, // hidden
|
||||
true, // requires_config
|
||||
true, // requires_install
|
||||
@ -39,7 +41,7 @@ namespace dropshell
|
||||
|
||||
|
||||
|
||||
bool uninstall_service(const std::string &server, const std::string &service, bool silent)
|
||||
bool uninstall_service(const std::string &server, const std::string &service, bool silent=false)
|
||||
{
|
||||
if (!silent)
|
||||
maketitle("Uninstalling " + service + " on " + server);
|
||||
@ -97,14 +99,14 @@ namespace dropshell
|
||||
std::vector<LocalServiceInfo> services = get_server_services_info(server);
|
||||
for (const auto &service : services)
|
||||
{
|
||||
if (!uninstall_service(server, service.service_name, false))
|
||||
if (!uninstall_service(server, service.service_name))
|
||||
okay = false;
|
||||
}
|
||||
return okay ? 0 : 1;
|
||||
}
|
||||
|
||||
std::string service = safearg(ctx.args, 1);
|
||||
return uninstall_service(server, service, false) ? 0 : 1;
|
||||
return uninstall_service(server, service) ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user