variables now correctly passed through to commands run from _allservicestatus.sh
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled

This commit is contained in:
Your Name
2025-05-17 12:33:35 +12:00
parent 4147d4b97f
commit f362c1699b
3 changed files with 46 additions and 56 deletions

View File

@ -65,22 +65,16 @@ function run_command() {
# run the command in a subshell to prevent environment changes
CURRENT_OUTPUT=$(
set -a
load_dotenv "${service_path}/template/_default.env"
load_dotenv "${service_path}/config/service.env"
load_dotenv "${service_path}/config/.template_info.env"
set +a
# 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::agent(server_name);
# all_env_vars["HOST_NAME"] = server_info.ssh_host;
# update the main variables.
export CONFIG_PATH="${service_path}/config"
# SERVER is already set
export SERVICE="${SERVICE_NAME}"
export AGENT_PATH="${SCRIPT_DIR}"
# HOST_NAME is already set
CONFIG_PATH="${service_path}/config"
SERVICE="${SERVICE_NAME}"
set +a
_check_required_env_vars_allservicesstatus "CONFIG_PATH" "SERVER" "SERVICE" "AGENT_PATH" "HOST_NAME" "TEMPLATE"