|< Day Day Up >|
The environment variables unique to rt are all prefixed by RT so as not to interfere with other applications. They are all Uppercase. The following is a list of all the supported variables.
The following example sets the essential variables in the bash shell:
$ export RTUSER=rtuser $ export RTPASSWD=secret $ export RTSERVER=rt.example.com
RTQUERY specifies a default query string:
$ export RTQUERY="Status='new' and Priority > 7"
With a default query in place, you can call show without any arguments, and it will use the default query:
$ rt show
You also might change the target server on-the-fly and request a particular ticket instead of using the default query specified in the environment:
$ RTSERVER=support.example.com rt show ticket/66
Or you might decide to put all this information in a custom configuration file (see "Configuration Files" later in this chapter). The RTCONFIG environment variable defines which configuration file to use:
$ export RTCONFIG=/rt/prod/config_file
RTCONFIG is useful when you have multiple different RT servers, perhaps one for internal use and one for external or client use. In this case you might create different configuration files to specify the RT server to access, appropriate user/password combinations and perhaps a default query string and switch between them on the fly:
$ RTCONFIG=./internal_rtrc rt show ... $ RTCONFIG=./external_rtrc rt show ...
Setting environment variables on your operating system may have limitations or restrictions. See your OS and shell documentation for instructions on the various methods you can use to set them.
Note also that values set in environment variables override values set in the configuration file described below.
|< Day Day Up >|