Configuration command
You can use the config command-line interface (CLI) to manage configuration items. Therefore, use this CLI to add the configuration items to the Registry Services database, to delete, and to list them.
Configuration items, also known as CIs, are parameters that you can use to set specific Registry Services functions.
For example, how to set a public URL, the retry-after response, or the operation mode to the application.
Command syntax
The config CLI syntax varies according to the environment in which it is run:- frs.bat config -set [-file] configItem | -delete configItemKey | -list [-properties properties_file]
- ./frs.sh config -set [-file] configItem | -delete configItemKey | -list [-properties properties_file]
Parameters
Table 1 lists the parameters that are used with the config CLI and provides their description.
| Parameter | Value | Description |
|---|---|---|
| -set [-file] | configItem | The -set parameter value
defines that the config command must add a configuration
item with the format key=value in the Registry Services database. In the key=value format,
you can specify multiple values, and these values must be comma-separated. You can specify the [-file] optional parameter instead of the -set parameter. When you specify [-file], you must define the path to a text file that contains a list of configuration items to be added to the Registry Services database. This text file must contain one configuration item at each file. |
| -delete | configItemKey | This value defines that the config command must remove the specified configuration item from the Registry Services database. |
| -list | This parameter requires no value | This value defines that the config command must return a list of all the configuration items added to the Registry Services database. |
| [-properties] | properties_file | This value defines that the .properties file
must act as the source of the configuration properties. This parameter
is optional. If you do not specify this parameter, this command uses
the default REGISTRY_HOME\etc\CLI.properties file as the source
of configuration properties. A mandatory property becomes optional when you configure Registry Services through the CLI. This property is: package.dir. Registry Services can determine the location of the file this property specifies based on the location of frs.bat or frs.sh scripts. However, if you specify this property in the .properties file, it takes precedence over automatic determination. |
Sample
frs.bat config -file C:/etc/config.txt -properties C:/etc/configuration.properties
frs.bat config -delete newSerialNumber
frs.bat config -list -properties Registry_Home/etc/config.properties
./frs.sh config -set newSerialNumber=123456
./frs.sh config -list
Return codes
The config command prints a return code when it finishes running so you can have details of the result achieved. Table 2 provides the return codes that you can get by the end of the config command run and their respective descriptions.
| Return code | Description |
|---|---|
| 0 | The config command ran the operation successfully. |
| 1 | The config command failed to run because of a missing -set | -delete | -list parameter. |
| 2 | The config command failed to run because of an invalid or not found .properties file. |
| 3 | The config command failed to run because of an invalid -set | -delete parameter that is specified in the command line. |
| 4 | The config command failed to run because of it was not able to add or remove the configuration item to the Registry Services database. |
98 |
The config command failed to run because Registry Services is unable to determine the current operation mode. |
99 |
The config command failed to run because the readonly operation mode is active. |