Broken
This commit is contained in:
@ -161,70 +161,69 @@ namespace localpath {
|
||||
// |-- (other config files for specific server&service)
|
||||
|
||||
|
||||
remotefile::remotefile(const std::string &server_name, const std::string &user) :
|
||||
mServer_name(server_name), mUser(user) {}
|
||||
|
||||
namespace remotefile {
|
||||
|
||||
std::string service_env(const std::string &server_name, const std::string &service_name)
|
||||
std::string remotefile::service_env(const std::string &service_name) const
|
||||
{
|
||||
return remotepath::service_config(server_name, service_name) + "/service.env";
|
||||
return remotepath(mServer_name,mUser).service_config(service_name) + "/service.env";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace remotepath {
|
||||
std::string DROPSHELL_DIR(const std::string &server_name)
|
||||
remotepath::remotepath(const std::string &server_name, const std::string &user) : mServer_name(server_name), mUser(user) {}
|
||||
|
||||
std::string remotepath::DROPSHELL_DIR() const
|
||||
{
|
||||
return server_env_manager(server_name).get_DROPSHELL_DIR();
|
||||
return server_env_manager(mServer_name).get_user_dir(mUser);
|
||||
}
|
||||
|
||||
std::string services(const std::string &server_name)
|
||||
std::string remotepath::services() const
|
||||
{
|
||||
std::string dsp = DROPSHELL_DIR(server_name);
|
||||
std::string dsp = DROPSHELL_DIR();
|
||||
return (dsp.empty() ? "" : (dsp + "/services"));
|
||||
}
|
||||
|
||||
std::string service(const std::string &server_name, const std::string &service_name)
|
||||
std::string remotepath::service(const std::string &service_name) const
|
||||
{
|
||||
std::string services_path = services(server_name);
|
||||
std::string services_path = services();
|
||||
return (services_path.empty() ? "" : (services_path + "/" + service_name));
|
||||
}
|
||||
|
||||
std::string service_config(const std::string &server_name, const std::string &service_name)
|
||||
std::string remotepath::service_config(const std::string &service_name) const
|
||||
{
|
||||
std::string service_path = service(server_name, service_name);
|
||||
std::string service_path = service(service_name);
|
||||
return (service_path.empty() ? "" : (service_path + "/config"));
|
||||
}
|
||||
|
||||
std::string service_template(const std::string &server_name, const std::string &service_name)
|
||||
std::string remotepath::service_template(const std::string &service_name) const
|
||||
{
|
||||
std::string service_path = service(server_name, service_name);
|
||||
std::string service_path = service(service_name);
|
||||
return (service_path.empty() ? "" : (service_path + "/template"));
|
||||
}
|
||||
|
||||
std::string backups(const std::string &server_name)
|
||||
std::string remotepath::backups() const
|
||||
{
|
||||
std::string dsp = DROPSHELL_DIR(server_name);
|
||||
std::string dsp = DROPSHELL_DIR();
|
||||
return (dsp.empty() ? "" : (dsp + "/backups"));
|
||||
}
|
||||
|
||||
std::string temp_files(const std::string &server_name)
|
||||
std::string remotepath::temp_files() const
|
||||
{
|
||||
std::string dsp = DROPSHELL_DIR(server_name);
|
||||
std::string dsp = DROPSHELL_DIR();
|
||||
return (dsp.empty() ? "" : (dsp + "/temp_files"));
|
||||
}
|
||||
|
||||
std::string agent(const std::string &server_name)
|
||||
std::string remotepath::agent() const
|
||||
{
|
||||
std::string dsp = DROPSHELL_DIR(server_name);
|
||||
std::string dsp = DROPSHELL_DIR();
|
||||
return (dsp.empty() ? "" : (dsp + "/agent"));
|
||||
}
|
||||
|
||||
std::string service_env(const std::string &server_name, const std::string &service_name)
|
||||
{
|
||||
std::string service_path = service_config(server_name, service_name);
|
||||
return (service_path.empty() ? "" : (service_path + "/service.env"));
|
||||
}
|
||||
} // namespace remotepath
|
||||
// std::string remotepath::service_env(const std::string &service_name) const
|
||||
// {
|
||||
// std::string service_path = service_config(service_name);
|
||||
// return (service_path.empty() ? "" : (service_path + "/service.env"));
|
||||
// }
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user