You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

72 lines
1.6 KiB

#!/bin/bash
# Arguments
EE_FIRST=$1
EE_SECOND=$2
EE_THIRD=$3
EE_FOURTH=$4
EE_FIFTH=$5
# Include library
for ee_include in $(find /usr/local/lib/easyengine/lib -iname "*.sh"); do
source $ee_include
done
# Let's capture the EasyEngine arguments
ee_lib_echo "EasyEngine (ee) execution started [$(date)]" &>> $EE_COMMAND_LOG
ee_lib_echo "EasyEngine (ee) command: $0 $@" &>> $EE_COMMAND_LOG
# EasyEngine version
if [ "$EE_FIRST" = "version" ] || [ "$EE_FIRST" = "--version" ] || [ "$EE_FIRST" = "-v" ]
then
# Display Easy Engine Version
echo "EasyEngine (ee) version: $EE_VERSION"
# EasyEngine stack/system
elif [ "$EE_FIRST" = "stack" ] || [ "$EE_FIRST" = "system" ]
then
# EasyEngine install
if [ "$EE_SECOND" = "install" ]
then
if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ]
then
if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ]; then
# Setup repository
ee_mod_repo_$EE_THIRD
# Fix GnuPG key
ee_lib_gpg_key_fix
fi
# Execute: apt-get update
ee_lib_apt_get_update
# Install nginx package
ee_mod_install_$EE_THIRD
if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ]; then
# Setup nginx
ee_mod_setup_$EE_THIRD
fi
if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ] || || [ "$EE_THIRD" = "postfix" ]; then
# Restart nginx
ee_lib_service $EE_THIRD restart
# Initialize Git
EE_GIT_DIR=/etc/$EE_THIRD/
ee_lib_git_init
fi
# Display success message
ee_lib_echo "$EE_THIRD successfully installed"
fi
fi
fi