#include "command_registry.hpp" #include "config.hpp" #include "utils/utils.hpp" #include "utils/directories.hpp" #include "templates.hpp" #include "shared_commands.hpp" #include "utils/hash.hpp" #include "autogen/_agent-local.hpp" #include "autogen/_agent-remote.hpp" #include "services.hpp" #include "utils/output.hpp" #include #include #include #include #include #include #include "utils/assert.hpp" #include "servers.hpp" namespace dropshell { int install_handler(const CommandContext &ctx); static std::vector install_name_list = {"install", "reinstall", "update"}; // Static registration struct InstallCommandRegister { InstallCommandRegister() { CommandRegistry::instance().register_command({install_name_list, install_handler, shared_commands::std_autocomplete_allowall, false, // hidden false, // requires_config false, // requires_install 0, // min_args (after command) 2, // max_args (after command) "install [SERVER] [SERVICE|all]", "Install/reinstall host, remote servers, or service(s). Safe/non-destructive way to update.", // heredoc R"( Install components on a server. This is safe to re-run (non-destructive) and used to update servers and their services. install (re)install dropshell components on this computer, and on all servers. install SERVER (re)install dropshell agent on the particular given server. install SERVER [SERVICE|all] (re)install the given service (or all services) on the given server. Note you need to create the service first with: dropshell create-service