Store persisted config directory
The persisted configuration subdirectory will be used to store changes to the configuration. The gwdirs.h header now supports setting and getting the value for this directory.
This commit is contained in:
@ -65,6 +65,7 @@
|
||||
#include <maxscale/service.h>
|
||||
#include <maxscale/spinlock.h>
|
||||
#include <maxscale/utils.h>
|
||||
#include <maxscale/gwdirs.h>
|
||||
|
||||
typedef struct duplicate_context
|
||||
{
|
||||
|
@ -26,6 +26,17 @@ void set_configdir(char* str)
|
||||
configdir = str;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the configuration parts file directory
|
||||
* @param str Path to directory
|
||||
*/
|
||||
void set_config_persistdir(char* str)
|
||||
{
|
||||
MXS_FREE(config_persistdir);
|
||||
clean_up_pathname(str);
|
||||
config_persistdir = str;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the log file directory
|
||||
* @param str Path to directory
|
||||
@ -160,6 +171,15 @@ char* get_configdir()
|
||||
return configdir ? configdir : (char*) default_configdir;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the configuration file directory
|
||||
* @return The path to the configuration file directory
|
||||
*/
|
||||
char* get_config_persistdir()
|
||||
{
|
||||
return config_persistdir ? config_persistdir : (char*) default_config_persistdir;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the PID file directory which contains maxscale.pid
|
||||
* @return Path to the PID file directory
|
||||
|
Reference in New Issue
Block a user