Командний рядок¶
Нове в версії 1.1.4.
Тепер Galette пропонує інтерфейс командного рядка для керування деякими завданнями. Це доступно через сценарій bin/console у кореневому каталозі Galette:
$ cd /var/www/html/galette
$ php bin/console
Galette v1.1.3
Usage:
command [options] [arguments]
Options:
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
completion Dump the shell completion script
help Display help for a command
list List commands
galette
galette:checks Check Galette requirements
galette:install Install Galette
galette:plugins:disable Disable Galette plugins
galette:plugins:enable Enable Galette plugins
galette:plugins:install-db Install Galette plugins database
galette:plugins:list List existing Galette plugins
Ви можете отримати довідку для певної команди за допомогою команди help:
Перевірте¶
Це лише перевірка передумов Galette і не має конкретних аргументів.
Примітка
У деяких системах конфігурація PHP може відрізнятися між cli та web; тому рекомендується перевірити вимоги за допомогою веб-скрипту galette_compat.php.
встановити¶
Ця команда, очевидно, встановлює Galette :)
$ php bin/console help galette:install
Description:
Install Galette
Usage:
galette:install [options]
Options:
--dbtype=DBTYPE Database type (mysql, pgsql)
--dbhost=DBHOST Database hostname or IP address
--dbport=DBPORT Database port
--dbname=DBNAME Database schema name
--dbprefix[=DBPREFIX] Database table prefix
--dbuser=DBUSER Database user
--dbpass[=DBPASS] Database password
--admin=ADMIN Administrator username
--password=PASSWORD Administrator password
--ignore-config Ignore existing configuration file
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
За замовчуванням сценарій перевірить наявний файл конфігурації, ви можете проігнорувати це за допомогою параметра --ignore-config.
Необхідні параметри, які не були надані під час виклику сценарію, будуть запитуватися в інтерактивному режимі.
$ php bin/console galette:install -vvv
Welcome to Galette installer!
=============================
Using existing configuration for database type
Using existing configuration for database name
Using existing configuration for database prefix
Using existing configuration for database host
Using existing configuration for database port
Using existing configuration for database user
Database password:
>
Superadmin name [admin]:
>
Superadmin password:
>
------------- --------------
Database information
Type mysql
Name galette
Prefix galette_
Host localhost
Port 3306
User galette
Password ********
------------- --------------
Superadmin information
Name admin
Password *****
------------- --------------
[WARNING] Configuration file already exists and matches the provided database information.
All existing data will be lost if you continue.
Do you want to continue? (yes/no) [no]:
>
Super administrator password¶
Нове в версії 1.3.0.
The super administrator password is normally changed from the preferences, or from the advanced configuration page. Both require to be logged in, which is of little help the day the password is lost: the super administrator is not a member, so it cannot use the forgotten password form either.
This command is the way back in. It runs on the machine hosting Galette, and that access stands as the authentication.
$ php bin/console help galette:superadmin:password
Description:
Change the super administrator password
Usage:
galette:superadmin:password
Options:
-h, --help Display help for the given command. When no command is given display help for the list command
--silent Do not output any message
-q, --quiet Only errors are displayed. All other output is suppressed
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
There is no option to pass the password with: it is only ever read from a hidden prompt, so that it does not end up in your shell history nor in the process list of the machine. It is asked twice, and the two answers must match.
$ php bin/console galette:superadmin:password
Change the super administrator password
=======================================
Super administrator login: admin
New password:
>
Confirm new password:
>
[OK] Super administrator password has been changed.
The login is displayed so you know which account you just changed, but the command does not touch it. Change it from the preferences, as usual.
The new password must satisfy the password rules of your instance, exactly as it would from the preferences page: too short a password, or one that does not reach the required strength, is refused and nothing is stored.
Примітка
A terminal is needed. Called with --no-interaction, or with its input piped from a file or another command, the command refuses to run rather than silently doing nothing.
Попередження
The command is disabled when Galette runs in DEMO mode.
Команди плагінів¶
Ви можете створити список наявних плагінів за допомогою команди galette:plugins:list:
$ php bin/console galette:plugins:list
Galette plugins
===============
* Galette Activities (1.0.3)
* Galette Auto (2.1.1)
* Galette Events (2.1.2)
* Galette Maps (2.1.0)
* Galette OAuth2 (3.0.0)
* plugin-fullcard (disabled)
* plugin-paypal (disabled)
* plugin-objectslend (disabled)
Доступні команди:
galette:plugin:disable: вимкнути плагінgalette:plugin:enable: увімкнути плагінgalette:plugin:install-db: встановити базу даних плагінів
Попередження
Встановлення бази даних плагінів видалить усі існуючі таблиці плагінів!
Для кожної команди, пов’язаної з додатком, ви можете точно вказати, з яким додатком(ами) ви хочете діяти, використати прапорець --all або покладатися на інтерактивний режим:
$ php bin/console galette:plugins:disable
Galette plugins management
==========================
Which plugins do you want to select?
[* ] All plugins
[plugin-activities] Galette Activities
[plugin-auto ] Galette Auto
[plugin-events ] Galette Events
[plugin-maps ] Galette Maps
[plugin-oauth2 ] Galette OAuth2