Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Latest commit

 

History

History
137 lines (98 loc) · 2.82 KB

CLI.md

File metadata and controls

137 lines (98 loc) · 2.82 KB

CLI API

To use the CLI API you need to run commands in the form:

php installer.php -a ACTION \
    <PARAMETERS>

Request

The following reference indicates which parameters you need to pass for each available action.

checkLicense

Checks Chevereto license status. Note that a valid license will be required at download step.

-a checkLicense

Parameter Option
license l
php installer.php -a checkLicense -l=LICENSE_KEY

checkDatabase

Checks database credentials and privileges. Note that an empty database is required.

-a checkDatabase

Parameter Option
host h
port p
name n
user u
userPassword x
php installer.php -a checkDatabase \
    -h localhost \
    -p 3306 \
    -n db_name \
    -u db_user \
    -x db_password

download

Download the target Chevereto software. Note that the license must be active to download Chevereto.

-a download

Parameter Options
Tag t
License l
php installer.php -a download \
    -t=4 \
    -l=LICENSE_KEY

You can check the license with the checkLicense action.

extract

Extract the downloaded software file (-f) in the target path (-p).

-a extract

Parameter Option
WorkingPath p
FilePath f
php installer.php -a extract \
    -p /var/www/html/ \
    -f chevereto-pkg-*.zip

Note: The installer will backup the extracted index.php Chevereto front-controller as index.chevereto.php in the target working path (-p). This can be restored by running selfDestruct action.

createEnv

Generates the .env file containing the database environment variables.

-a createEnv

Parameter Option
DB Host h
DB Port p
DB Name n
DB User u
DB User Password x
Filepath for the .env file f
php installer.php -a createEnv \
    -h localhost \
    -p 3306 \
    -n db_name \
    -u db_user \
    -x db_password \
    -f .env

lock

Creates a installer.lock file to prevent using the installer.

php installer.php -a lock

selfDestruct

Destructs the installer file (-f) and restore the index.chevereto.php file as index.php front controller in the working path (-p).

-a selfDestruct

Parameter Option
WorkingPath p
FilePath f
php installer.php -a selfDestruct \
    -p /var/www/html/ \
    -f /var/www/html/installer.php