documentation icon indicating copy to clipboard operation
documentation copied to clipboard

use --option=value version of options in occ maintenance:install

Open melato opened this issue 2 years ago • 0 comments

The manual should use the --option=value format of options in the examples of the occ maintenance:install command. The "--option value" format fails if the value begins with a dash ("-"), which is likely to happen if the option value is a randomly generated password and in some other cases. See https://github.com/nextcloud/server/issues/26109

The documentation files for maintenance:install are:

admin_manual/configuration_server/occ_command.rst
admin_manual/installation/command_line_installation.rst

The PDF sections for Nextcloud 23 are: 4.5. Installing from command line 5.2.25 Command line installation

The web pages: Nextcloud Configuration / Using the occ command / Command Line Installation

Installation and server configuration / Installing from command line

Both sections have this example, which uses the "--option value" format for options:

cd /var/www/nextcloud/
sudo -u www-data php occ maintenance:install --database
"mysql" --database-name "nextcloud"  --database-user "root" --database-pass
"password" --admin-user "admin" --admin-pass "password"
Nextcloud is not installed - only a limited number of commands are available
Nextcloud was successfully installed

"php occ help maintenance:install" shows the --option=value format for options:

Usage:
  maintenance:install [options]

Options:
      --database=DATABASE                            Supported database type [default: "sqlite"]
      --database-name=DATABASE-NAME                  Name of the database
      --database-host=DATABASE-HOST                  Hostname of the database [default: "localhost"]
      --database-port=DATABASE-PORT                  Port the database is listening on
      --database-user=DATABASE-USER                  User name to connect to the database
      --database-pass[=DATABASE-PASS]                Password of the database user
      --database-table-space[=DATABASE-TABLE-SPACE]  Table space of the database (oci only)
      --admin-user=ADMIN-USER                        User name of the admin account [default: "admin"]
      --admin-pass=ADMIN-PASS                        Password of the admin account
      --admin-email[=ADMIN-EMAIL]                    E-Mail of the admin account
      --data-dir=DATA-DIR                            Path to data directory

melato avatar Apr 15 '22 15:04 melato