MAJRO CHANGES!@!!@#

This commit is contained in:
j
2025-12-29 23:35:57 +13:00
parent a183b6814a
commit 7a406168e7
6 changed files with 121 additions and 17 deletions

View File

@@ -32,12 +32,6 @@ namespace dropshell
return (servicepath.empty() ? "" : (fs::path(servicepath) / filenames::service_env).string());
}
std::string template_info_env(const std::string &server_name, const std::string &service_name)
{
std::string servicepath = localpath::service(server_name, service_name);
return (servicepath.empty() ? "" : (fs::path(servicepath) / filenames::template_info_env).string());
}
std::string template_example()
{
return localpath::agent_local() + "/template_example";
@@ -146,6 +140,7 @@ namespace dropshell
//------------------------------------------------------------------------------------------------
// remote paths
// DROPSHELL_DIR
// |-- server.json
// |-- backups
// |-- temp_files
// |-- agent
@@ -157,9 +152,10 @@ namespace dropshell
// |-- service.env (actual service config)
// |-- template
// |-- (script files)
// |-- template_info.env
// |-- config
// |-- service.env (default service config)
// |-- (other config files for specific server&service)
// |-- (other template/example config files)
remotefile::remotefile(const std::string &server_name, const std::string &user) : mServer_name(server_name), mUser(user) {}
@@ -168,6 +164,11 @@ namespace dropshell
return remotepath(mServer_name, mUser).service_config(service_name) + "/" + filenames::service_env;
}
std::string remotefile::server_json()
{
return remotepath(mServer_name, mUser).DROPSHELL_DIR() + "/" + filenames::server_json;
}
remotepath::remotepath(const std::string &server_name, const std::string &user) : mServer_name(server_name), mUser(user) {}
std::string remotepath::DROPSHELL_DIR() const