esimonetti/toothpaste 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

esimonetti/toothpaste

Composer 安装命令:

composer require esimonetti/toothpaste

包简介

CLI utility to analyse, optimise and provide additional functionality to your Sugar system

README 文档

README

This tool is provided AS-IS and might have bugs. Please help create and provide bug fixes!

Donations

If you find this software useful, please consider supporting the work that went into it, with a monthly amount. Thank you!

Description

CLI utility to analyse, optimise and provide additional functionality to your Sugar system. As it is a CLI only tool, it cannot execute from within Sugar Cloud.
This tool allows the execution of various CLI actions including repair, useful ongoing maintenance, identification of possible problems and extracting data from a Sugar installation.

Requirements

  • Linux or Macintosh
  • PHP >= 7.1
  • Composer
  • Some commands only run with MySQL at this stage

Installation

Within your installation directory (eg: ~/toothpaste), run the following:

composer require esimonetti/toothpaste dev-master

Composer will download toothpaste and all its dependencies, so that you are ready to go.
To be able to execute local commands, toothpaste has to be able to access a local Sugar installation, be on the same server, and with php CLI available.

Installation on SugarDockerized

As there were some problems running the installation commands from outside the containers, the following installation steps will enter the sugar-cron container to perform the installation.

docker exec -it sugar-cron bash
mkdir ../toothpaste
cd ../toothpaste
composer require esimonetti/toothpaste dev-master
exit

Running toothpaste on SugarDockerized

To execute toothpaste, leverage the bash scripts provided with SugarDockerized

./utilities/runcli.sh "cd ../toothpaste && ./vendor/bin/toothpaste list"

Sample uses

List

To show the list of commands available, run the following:

./vendor/bin/toothpaste list

Repair

To repair a system (located in /var/www/html/sugar), run the following:

./vendor/bin/toothpaste local:system:repair --instance /var/www/html/sugar
Toothpaste vX.X.X
Executing Repair command...
Entering /var/www/html/sugar...
Setting up instance...
Executing simple repair...
Clearing cache...
Executing basic instance warm-up...
Execution completed in 6.01 seconds.

Maintenance on/off

To set maintenance mode on/off for a system (located in /var/www/html/sugar), run the following:

./vendor/bin/toothpaste local:maintenance:on --instance /var/www/html/sugar
Toothpaste vX.X.X
Setting maintenance mode on...
Entering /var/www/html/sugar...
Setting up instance...
The configuration setting maintenanceMode is now set to: on
The system is ONLY accessible via the UI by ADMINISTRATOR users
Execution completed in 0.19 seconds.
./vendor/bin/toothpaste local:maintenance:off --instance /var/www/html/sugar
Toothpaste vX.X.X
Setting maintenance mode off...
Entering /var/www/html/sugar...
Setting up instance...
The configuration setting maintenanceMode is now set to: off
The system is accessible via the UI by all users
Execution completed in 0.17 seconds.

统计信息

  • 总下载量: 1.04k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 4
  • Forks: 18
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2019-10-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固