Using the bin cmd

Contributers: Mick Mifsud

Modified: 3 years ago

Page Permission: Public - Revision: 785

The projects "cmd" command has a number of helpful tools that you can use from development and release. Each project has a set of default commands that are available to all projects however some projects have extra sub commands for tools to be used with site specific operations.

$ ./bin/cmd  
Log Path not readable: /var/log/apache2/error.log
Base TkUni Site 1.0

Usage:
 command [options] [arguments]

Options:
 -h, --help            Display this help message
 -q, --quiet           Do not output any message
 -V, --version         Display this application version
     --ansi            Force ANSI output
     --no-ansi         Disable 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:
 clean-data   [cd] Clean the data/ folder of empty folders
 cron         The site cron script. crontab line: */1 *  * * *   /home/user/public_html/project/bin/cmd cron > /dev/null 2>&1
 dbbackup     Call this to dump a copy of the Database sql to stdout or a file if an argument is given
 help         Displays help for a command
 list         Lists commands
 maintenance  Enable/Disable the sites maintenance mode. Current: Disabled
 migrate      [mgt] Migrate the DB file for this project and its dependencies
 upgrade      [ug] Call this to upgrade the site from git and update its dependencies
 userPass     [pwd] Set a users new password

The most common commands used are the "cron" which is setup in the crontab if you need to run recurring processes. Then there is the upgrade command that only works when the debug mode is disabled in the config.php, this will upgrade the site to the most recent repository tag and run any database upgrades.