zaporylie/drush-maintenance-mode

验证当Drupal处于维护模式时哪些drush命令可以运行。

0.1.0 2020-11-28 11:09 UTC

This package is auto-updated.

Last update: 2024-08-29 06:12:50 UTC


README

限制在网站处于维护模式时允许运行的drush命令列表。

安装

composer require zaporylie/drush-maintenance-mode

配置

在项目的根目录(composer根目录)中创建一个文件 .drush-maintenance-mode.yml。在 commands.allowed 属性下列出所有命令(按命令名称)。命令名称应作为键使用。

示例

commands:
  allowed:
    // Preview site state.
    'core:status':
    // Clear cache.
    'cache:clear':
    // Take the site out of maintenance mode using drush.
    'state:set':
    // Update database.
    'updatedb':
    'updatedb:status':
    // Export configuration split.
    'config-split:export':
    // Import configuration.
    'config-split:import':
    'config:import':
    // Import translations.
    'locale:update':
    // Used internally by bunch of commands above.
    'batch:process':