setup
Helps creating a configuration file.
Mode:
The setup
command has two modes: interactive and non-interactive.
The interactive mode will guide you through the information it needs to create the file. The non-interactive mode demands that you provide the information with command options.
Syntax:
shell
sfiler-config-cli [options] setup [-i] [command options]
Command options | Required / Optional | Description |
---|---|---|
-i | Optional | Runs the command in interactive mode. (Default: true) |
-u | Required when in non-interactive mode | The user name used to connect to the database |
-p | Required when in non-interactive mode | The password used to connect to database |
--password-stdin | Optional | Reads the password from stdin. This will override the password option |
-U | Optional | The URL used to connect to the database. Either provide it or the DBMS, host, port, and database name. This will override all the other database options. |
-D | Required when in non-interactive mode | The DBMS (Database Managment System) of the database |
-h | Optional when providing the URL, required otherwise in non-interactive mode | The host of the database |
-P | Optional when providing the URL, required otherwise in non-interactive mode | The port of the database |
-d | Optional when providing the URL, required otherwise in non-interactive mode | The database name |
-dr | Optional | The driver used to connect to the database. This will override the default driver for the specified DBMS |
-dia | Optional | The Hibernate dialect used to connect to the database. This will override the default dialect for the specified DBMS |
-o | Optional | The options used to connect to the database. This will be appended to the URL |
-O | Optional | The output file where the configuration will be saved. Default is ./sfiler.conf |
-v | Optional | Show verbose output |
-q | Optional | Show no output |
Example:
Interactive mode:
shell
./sfiler-config-cli.sh setup -i
Non-interactive mode:
shell
./sfiler-config-cli.sh setup -u sfiler-user -p sfiler-pwd -D MARIADB -h 127.0.0.1 -P 1442 -d sfile
This command will create a working configuration file named sfiler.conf
in the current working directory for the specified database configuration.