#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.hpp" #include #include #include #include #include #include "utils/assert.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, std_autocomplete_allowstar, false, // hidden false, // requires_config false, // requires_install 0, // min_args (after command) 2, // max_args (after command) "install SERVER [SERVICE]", "Install/reinstall 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. install SERVER (re)install dropshell agent on the given server. install SERVER [SERVICE|*] (re)install the given service (or all services) on the given server. Note you need to create the service first with: dropshell create-service