Module is containing all necessary global variables for the package.
Module also has the ability to read user-defined data from two paths:
See _SETTINGS_PATH for details.
Note
If the first path is found, other is ignored.
Example of the configuration file ($HOME/edeposit/ftp.json):
{
"CONF_PATH": "/home/bystrousak/.ftpdconf/"
}
Module’s path.
Proftpd configuration directory.
Proftpd log directory.
Path to directory, where the user directories will be created.
Server’s address - used only in unit/integration testing.
Proftpd configuration file (in CONF_PATH directory).
File where the login informations will be stored (CONF_PATH is used as dirname).
File where the extended logs are stored (LOG_PATH is used as dirname).
Filename for the locking mechanism.
Filename, where the error protocol is stored.
Filename, where the import protocol for the user is stored.
Text, which will be writen to the PROTFPD_LOCK_FILENAME.
True - will pair files with same filename in same directory
True - will pair files with different filenames, if there is only two files in dir
True - if the name is ISBN, files will be paired no matter where they are stored (unless they weren’t paired before)
True - Lock file can be only in home directory, everywhere else will be ignored
True - USER_IMPORT_LOG will be created
True - don’t remove badly formatted metadata files
I am using GID 2000 for all our users - this GID shouldn’t be used by other than FTP users!
Merge global configuration with user’s personal configuration.
Global configuration has always higher priority.
Get list of all uppercase, non-private globals (doesn’t start with _).
Returns: | list – Uppercase names defined in globals() (variables from this module). |
---|
Set global variables to values defined in config_dict.
Parameters: | config_dict (dict) – dictionary with data, which are used to set globals. |
---|
Note
config_dict have to be dictionary, or it is ignored. Also all variables, that are not already in globals, or are not types defined in _ALLOWED (str, int, float) or starts with _ are silently ignored.