diff --git a/src/commands/edit.cpp b/src/commands/edit.cpp index ac3dd07..fa71d76 100644 --- a/src/commands/edit.cpp +++ b/src/commands/edit.cpp @@ -26,6 +26,7 @@ struct EditCommandRegister { std_autocomplete, false, // hidden false, // requires_config + false, // requires_install 0, // min_args (after command) 2, // max_args (after command) "edit [SERVER] [SERVICE]", diff --git a/src/commands/health.cpp b/src/commands/health.cpp index 40f8b6e..06456ba 100644 --- a/src/commands/health.cpp +++ b/src/commands/health.cpp @@ -22,9 +22,10 @@ namespace dropshell { CommandRegistry::instance().register_command({health_name_list, health_handler, - std_autocomplete, + std_autocomplete_allowallservices, false, // hidden - false, // requires_config + true, // requires_config + true, // requires_install 1, // min_args (after command) 2, // max_args (after command) "health SERVER", diff --git a/src/commands/list.cpp b/src/commands/list.cpp index 728cac1..f41a7ea 100644 --- a/src/commands/list.cpp +++ b/src/commands/list.cpp @@ -30,7 +30,8 @@ struct ListCommandRegister { list_handler, std_autocomplete, false, // hidden - false, // requires_config + true, // requires_config + true, // requires_install 0, // min_args (after command) 2, // max_args (after command) "list [SERVER] [SERVICE]", diff --git a/src/commands/nuke.cpp b/src/commands/nuke.cpp index 3743a34..348845b 100644 --- a/src/commands/nuke.cpp +++ b/src/commands/nuke.cpp @@ -41,14 +41,16 @@ struct NukeCommandRegister { std_autocomplete, false, // hidden true, // requires_config + true, // requires_install 2, // min_args (after command) 2, // max_args (after command) - "nuke SERVER SERVICE", + "nuke SERVER [SERVICE|*] ", "Nuke a service on a server. Destroys everything, both local and remote!", // heredoc R"( Nuke a service on a server. Destroys everything, both local and remote! - nuke nuke the given service on the given server. + nuke SERVER SERVICE nuke the given service on the given server. + nuke SERVER * nuke all services on the given server. )" }); } diff --git a/src/commands/uninstall.cpp b/src/commands/uninstall.cpp index c993897..49324ae 100644 --- a/src/commands/uninstall.cpp +++ b/src/commands/uninstall.cpp @@ -25,13 +25,13 @@ namespace dropshell true, // requires_install 1, // min_args (after command) 2, // max_args (after command) - "uninstall SERVER [SERVICE]", + "uninstall SERVER [SERVICE|*]", "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 (or all services) on the given server; - preserves configuration and user data. + uninstall SERVER SERVICE uninstall the given service on the given server. + uninstall SERVER * uninstall all services on the given server. )"}); } } uninstall_command_register; diff --git a/src/commands/version.cpp b/src/commands/version.cpp index cd6b4cb..5d960f9 100644 --- a/src/commands/version.cpp +++ b/src/commands/version.cpp @@ -32,7 +32,7 @@ namespace dropshell { uninstall uninstall all services on the given server. )"}); } - } uninstall_command_register; + } version_command_register; int version_handler(const CommandContext &ctx) diff --git a/src/services.cpp b/src/services.cpp index 540d8c9..3c7eecd 100644 --- a/src/services.cpp +++ b/src/services.cpp @@ -229,8 +229,7 @@ bool get_all_service_env_vars(const std::string &server_name, const std::string all_env_vars["CONFIG_PATH"] = remotepath::service_config(server_name,service_name); all_env_vars["SERVER"] = server_name; all_env_vars["SERVICE"] = service_name; - all_env_vars["AGENT_PATH"] = remotepath::service_template(server_name, "dropshell-agent") + "/shared"; - all_env_vars["EXECUTABLES"] = remotepath::executables(server_name); + all_env_vars["AGENT_PATH"] = remotepath::agent(server_name); ServerInfo server_info = get_server_info(server_name); if (server_info.ssh_host.empty()) diff --git a/src/version.hpp b/src/version.hpp new file mode 100644 index 0000000..ec52c09 --- /dev/null +++ b/src/version.hpp @@ -0,0 +1,15 @@ +#pragma once + +// DUMMY VERSION - replaced by build process. + +#include + +namespace dropshell { + +// Version information +const std::string VERSION = "DEV"; +const std::string RELEASE_DATE = "NEVER"; +const std::string AUTHOR = "j842"; +const std::string LICENSE = "MIT"; + +} // namespace dropshell \ No newline at end of file