feat: Update 2 files
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 38s
Build-Test-Publish / build (linux/arm64) (push) Successful in 1m11s

This commit is contained in:
j842
2025-09-04 12:55:59 +12:00
parent 5e39346aff
commit 233285343a
2 changed files with 16 additions and 3 deletions

View File

@@ -154,10 +154,22 @@ namespace dropshell
{ {
info << "Running " << service_info.template_name << " install script on " << server << "..." << std::endl; info << "Running " << service_info.template_name << " install script on " << server << "..." << std::endl;
// Check if install.sh exists on remote
std::string install_script_path = remotepath(server,user).service_template(service) + "/install.sh";
if (!server_env.check_remote_file_exists(install_script_path, user))
{
error << "Install script not found on remote server: " << install_script_path << std::endl;
error << "Make sure the template '" << service_info.template_name << "' contains an install.sh script" << std::endl;
return false;
}
shared_commands::cRemoteTempFolder remote_temp_folder(server_env, user); shared_commands::cRemoteTempFolder remote_temp_folder(server_env, user);
if (!server_env.run_remote_template_command(service, "install", {}, false, {{"TEMP_DIR", remote_temp_folder.path()}})) if (!server_env.run_remote_template_command(service, "install", {}, false, {{"TEMP_DIR", remote_temp_folder.path()}}))
{ {
error << "Failed to run install script on " << server << std::endl; error << "Failed to run install script for service '" << service << "' on server '" << server << "'" << std::endl;
error << "Template: " << service_info.template_name << std::endl;
error << "Script path: " << install_script_path << std::endl;
error << "Check that the script is executable and has no syntax errors" << std::endl;
return false; return false;
} }
} }

View File

@@ -184,8 +184,9 @@ namespace dropshell
if (!rval && !hasFlag(mode, cMode::Silent)) if (!rval && !hasFlag(mode, cMode::Silent))
{ {
error << "Failed to execute ssh command:" << std::endl; error << "Failed to execute ssh command" << std::endl;
debug << ssh_cmd.str() + " " + remote_command.construct_cmd(remote_bb64_path) << std::endl; debug << "SSH command: " << ssh_cmd.str() << std::endl;
debug << "Remote command: " << remote_command.construct_cmd(remote_bb64_path) << std::endl;
} }
return rval; return rval;
} }