Environment variables
If you have loaded the MetWork profile, you can rely on some environment variables.
Name | Description | Examples |
---|---|---|
MFMODULE |
Current loaded metwork module (in uppercase) | MFEXT , MFSERV |
MFMODULE_LOWERCASE |
Current loaded metwork module (in lowercase) | mfext , mfserv |
MFMODULE_HOME |
The installation home1 of the current loaded metwork module | /opt/metwork-mfext-0.9 , /opt/metwork-mfserv-0.8 |
MFMODULE_RUNTIME_HOME |
The runtime home2 of the current loaded metwork module | (empty), /home/mfserv |
MFMODULE_RUNTIME_USER |
The unix user who runs current loaded metwork module services, this user will create some files in the runtime home2 | (empty), mfserv |
MFMODULE_VERSION |
The full version number of the current loaded metwork module | 0.9.4 , integration.ci1036.1949d86 |
MFMODULE_STATUS |
The status of the current loaded metwork module3 | unknown , STARTING , RUNNING |
METWORK_PYTHON_MODE |
The major version of python version currently loaded | 3 , 2 |
MFEXT_HOME |
the installation home1 of the mfext module |
/opt/metwork-mfext-0.9 |
MFEXT_VERSION |
the full version number of the mfext module |
0.9.4 , integration.ci1036.1949d86 |
MFBUS_HOME |
alias of MFMODULE_HOME if the current loaded metwork module is mfbus |
/opt/metwork-mfserv-0.8 |
MFBUS_VERSION |
alias of MFMODULE_VERSION if the current loaded metwork module is mfbus |
0.9.4 , integration.ci1036.1949d86 |
-
The installation home (as opposed to runtime home) could be completly read-only. In most cases, files and directory inside installation home are owned by root and you don't have any unix rights to create or modify files in it. If you want to create something in installation home, you are most likely wrong. See runtime home for an alternative. ↩↩
-
The runtime home (as opposed to installation home) is the place where files and created and modified after the initial installation (most likely as root user). After the installation, this place is empty and files/directories are created here because of runtime usage. Files here should be owned by
${MFMODULE_RUNTIME_USER}
and not by root user. This value can be empty formfext
module as there is no associated service inside. ↩↩ -
Possible values are:
STARTING
(the module is starting)STOPPING
(the module is stopping)RUNNING
(the module is running ok)STOPPED
(the module is stopped)ERROR
(the module is running but there are some errors)unknown
(FIXME: deprecated)UNKNOWN
(we don't know)
In case of recent changes, you have to reload your terminal to refresh this environment variable. So, in most cases, you should prefer the content of the
${MFMODULE_RUNTIME_HOME}/var/status
file which contains the latest value. ↩