Added configurable executable file directory
This allows MaxScale to launch processes from the directory where the `maxscale` executable is located.
This commit is contained in:
@ -96,6 +96,18 @@ void set_libdir(char* param)
|
||||
libdir = param;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the executable directory. Internal processes will look for executables
|
||||
* from here.
|
||||
* @param str Path to directory
|
||||
*/
|
||||
void set_execdir(char* param)
|
||||
{
|
||||
free(execdir);
|
||||
clean_up_pathname(param);
|
||||
execdir = param;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the directory with all the modules.
|
||||
* @return The module directory
|
||||
@ -158,3 +170,12 @@ char* get_langdir()
|
||||
{
|
||||
return langdir ? langdir : (char*) default_langdir;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the directory with the executables.
|
||||
* @return The executables directory
|
||||
*/
|
||||
char* get_execdir()
|
||||
{
|
||||
return execdir ? execdir : (char*) default_execdir;
|
||||
}
|
||||
|
Reference in New Issue
Block a user