Browse Source

Added ee info command

old-stable
gau1991 11 years ago
parent
commit
6d160aeaae
  1. 4
      .travis.yml
  2. 44
      bin/easyengine

4
.travis.yml

@ -52,3 +52,7 @@ script:
- sudo bash -x ee stack start - sudo bash -x ee stack start
- sudo bash -x ee stack restart - sudo bash -x ee stack restart
- sudo bash -x ee stack reload - sudo bash -x ee stack reload
- sudo bash ee info nginx
- sudo bash ee info php
- sudo bash ee info mysql
- sudo bash ee info

44
bin/easyengine

@ -20,19 +20,27 @@ ee_lib_echo "EasyEngine (ee) command: $0 $@" &>> $EE_COMMAND_LOG
# EasyEngine version # EasyEngine version
if [ "$EE_FIRST" = "version" ] || [ "$EE_FIRST" = "--version" ] || [ "$EE_FIRST" = "-v" ] if [ "$EE_FIRST" = "version" ] || [ "$EE_FIRST" = "--version" ] || [ "$EE_FIRST" = "-v" ];then
then
# Display Easy Engine Version # Display Easy Engine Version
echo "EasyEngine (ee) version: $EE_VERSION" echo "EasyEngine (ee) version: $EE_VERSION"
# Display information about NGINX|PHP|MySQL
elif [ "$EE_FIRST" = "info" ];then
if [ "$EE_SECOND" = "nginx" ] || [ "$EE_SECOND" = "php" ] || [ "$EE_SECOND" = "mysql" ]; then
ee_lib_$EE_SECOND_info
else
ee_lib_nginx_info
ee_lib_php_info
ee_lib_mysql_info
fi
# EasyEngine stack/system # EasyEngine stack/system
elif [ "$EE_FIRST" = "stack" ] || [ "$EE_FIRST" = "system" ] elif [ "$EE_FIRST" = "stack" ] || [ "$EE_FIRST" = "system" ]; then
then
# EasyEngine install # EasyEngine install
if [ "$EE_SECOND" = "install" ]; then if [ "$EE_SECOND" = "install" ]; then
if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ] || [ "$EE_THIRD" = "postfix" ] || [ "$EE_THIRD" = "adminer" ] || [ "$EE_THIRD" = "phpmyadmin" ] || [ "$EE_THIRD" = "wpcli" ] || [ "$EE_THIRD" = "utils" ]; then if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ] || [ "$EE_THIRD" = "postfix" ] || [ "$EE_THIRD" = "adminer" ] || [ "$EE_THIRD" = "phpmyadmin" ] || [ "$EE_THIRD" = "wpcli" ] || [ "$EE_THIRD" = "utils" ]; then
if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ]; then if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ]; then
# Setup nginx/php repository # Setup NGINX/PHP repository
ee_mod_repo_$EE_THIRD ee_mod_repo_$EE_THIRD
# Fix GnuPG key # Fix GnuPG key
@ -43,12 +51,12 @@ then
# Execute: apt-get update # Execute: apt-get update
ee_lib_apt_get_update ee_lib_apt_get_update
# Install nginx/php/mysql/postfix package # Install NGINX/PHP/MySQL/Postfix package
ee_mod_install_$EE_THIRD ee_mod_install_$EE_THIRD
fi fi
if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ]; then if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ]; then
# Setup nginx/php/mysql # Setup NGINX/PHP/MySQL
ee_mod_setup_$EE_THIRD ee_mod_setup_$EE_THIRD
fi fi
@ -60,7 +68,7 @@ then
# Initialize Git # Initialize Git
ee_lib_git_init /etc/php5/ ee_lib_git_init /etc/php5/
else else
# Restart nginx/mysql/postfix # Restart NGINX/MySQL/Postfix
ee_lib_service $EE_THIRD restart ee_lib_service $EE_THIRD restart
# Initialize Git # Initialize Git
@ -69,14 +77,14 @@ then
fi fi
if [ "$EE_THIRD" = "adminer" ] || [ "$EE_THIRD" = "phpmyadmin" ] || [ "$EE_THIRD" = "wpcli" ] || [ "$EE_THIRD" = "utils" ];then if [ "$EE_THIRD" = "adminer" ] || [ "$EE_THIRD" = "phpmyadmin" ] || [ "$EE_THIRD" = "wpcli" ] || [ "$EE_THIRD" = "utils" ];then
# Install adminer/phpmyadmin/wpcli/utils # Install Adminer/phpMyAdmin/WP-CLI/Utils
ee_ven_install_$EE_THIRD ee_ven_install_$EE_THIRD
fi fi
# Display success message # Display success message
ee_lib_echo "$EE_THIRD successfully installed" ee_lib_echo "$EE_THIRD successfully installed"
elif [ "$EE_THIRD" = "" ]; then elif [ "$EE_THIRD" = "" ]; then
# Setup nginx/php repository # Setup NGINX/PHP repository
ee_mod_repo_nginx ee_mod_repo_nginx
ee_mod_repo_php ee_mod_repo_php
@ -86,24 +94,24 @@ then
# Execute: apt-get update # Execute: apt-get update
ee_lib_apt_get_update ee_lib_apt_get_update
# Install nginx/php/mysql/postfix package # Install NGINX/PHP/MySQL/Postfix package
ee_mod_install_nginx ee_mod_install_nginx
ee_mod_install_php ee_mod_install_php
ee_mod_install_mysql ee_mod_install_mysql
ee_mod_install_postfix ee_mod_install_postfix
# Setup nginx/php/mysql # Setup NGINX/PHP/MySQL
ee_mod_setup_nginx ee_mod_setup_nginx
ee_mod_setup_php ee_mod_setup_php
ee_mod_setup_mysql ee_mod_setup_mysql
# # Restart nginx/mysql/postfix # # Restart NGINX/MySQL/Postfix
ee_lib_service nginx php5-fpm mysql restart ee_lib_service nginx php5-fpm mysql restart
# Initialize Git # Initialize Git
ee_lib_git_init /etc/nginx/ /etc/php5/ /etc/mysql/ /etc/postfix ee_lib_git_init /etc/nginx/ /etc/php5/ /etc/mysql/ /etc/postfix
# Install adminer/phpmyadmin/wpcli/utils # Install Adminer/phpMyAdmin/WP-CLI/Utils
ee_ven_install_adminer ee_ven_install_adminer
ee_ven_install_phpmyadmin ee_ven_install_phpmyadmin
ee_ven_install_wpcli ee_ven_install_wpcli
@ -117,12 +125,12 @@ then
elif [ "$EE_SECOND" = "remove" ] || [ "$EE_SECOND" = "purge" ]; then elif [ "$EE_SECOND" = "remove" ] || [ "$EE_SECOND" = "purge" ]; then
if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ] || [ "$EE_THIRD" = "postfix" ] || [ "$EE_THIRD" = "adminer" ] || [ "$EE_THIRD" = "phpmyadmin" ] || [ "$EE_THIRD" = "wpcli" ] || [ "$EE_THIRD" = "utils" ]; then if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ] || [ "$EE_THIRD" = "postfix" ] || [ "$EE_THIRD" = "adminer" ] || [ "$EE_THIRD" = "phpmyadmin" ] || [ "$EE_THIRD" = "wpcli" ] || [ "$EE_THIRD" = "utils" ]; then
# Remove/Purge nginx/php/mysql/postfix package # Remove/Purge NGINX/PHP/MySQL/Postfix package
if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ] || [ "$EE_THIRD" = "postfix" ]; then if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ] || [ "$EE_THIRD" = "postfix" ]; then
ee_mod_remove_$EE_THIRD ee_mod_remove_$EE_THIRD
fi fi
# Remove/Purge adminer/phpmyadmin/wpcli/utils # Remove/Purge Adminer/phpMyAdmin/WP-CLI/Utils
if [ "$EE_THIRD" = "adminer" ] || [ "$EE_THIRD" = "phpmyadmin" ] || [ "$EE_THIRD" = "wpcli" ] || [ "$EE_THIRD" = "utils" ];then if [ "$EE_THIRD" = "adminer" ] || [ "$EE_THIRD" = "phpmyadmin" ] || [ "$EE_THIRD" = "wpcli" ] || [ "$EE_THIRD" = "utils" ];then
ee_ven_remove_$EE_THIRD ee_ven_remove_$EE_THIRD
fi fi
@ -137,13 +145,13 @@ then
ee_lib_echo "$EE_THIRD successfully purged" ee_lib_echo "$EE_THIRD successfully purged"
fi fi
elif [ "$EE_THIRD" = "" ]; then elif [ "$EE_THIRD" = "" ]; then
# Remove/Purge nginx/php/mysql/postfix package # Remove/Purge NGINX/PHP/MySQL/Postfix package
ee_mod_remove_nginx ee_mod_remove_nginx
ee_mod_remove_php ee_mod_remove_php
ee_mod_remove_mysql ee_mod_remove_mysql
ee_mod_remove_postfix ee_mod_remove_postfix
# Install adminer/phpmyadmin/wpcli/utils # Install Adminer/phpMyAdmin/WP-CLI/Utils
ee_ven_remove_adminer ee_ven_remove_adminer
ee_ven_remove_phpmyadmin ee_ven_remove_phpmyadmin
ee_ven_remove_wpcli ee_ven_remove_wpcli

Loading…
Cancel
Save