diff --git a/source/agent-remote/agent-install.sh b/source/agent-remote/agent-install.sh index 723fa79..6782e6b 100755 --- a/source/agent-remote/agent-install.sh +++ b/source/agent-remote/agent-install.sh @@ -2,7 +2,7 @@ # This script is used to install the dropshell agent on a remote server. -SCRIPT_DIR=$(dirname "$0") +SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" set -a diff --git a/source/src/commands/install.cpp b/source/src/commands/install.cpp index 862f9d6..e3b8731 100644 --- a/source/src/commands/install.cpp +++ b/source/src/commands/install.cpp @@ -498,7 +498,16 @@ complete -F _dropshell_completions dropshell ASSERT(server_env.is_valid(), "Invalid server environment for " + server); if (safearg(ctx.args, 1) == "all") { - // install all services on the server + // First, install/update the dropshell agent on the server + maketitle("Updating dropshell agent on " + server); + int agent_result = install_server(server_env); + if (agent_result != 0) + { + error << "Failed to update dropshell agent on " << server << std::endl; + return agent_result; + } + + // Then install all services on the server maketitle("Installing all services on " + server); bool okay = true; std::vector services = get_server_services_info(server);