revert site.py changes

This commit is contained in:
VirtuBox
2019-03-05 13:19:47 +01:00
parent 9d6f6c2bb4
commit 4f8c618269
6 changed files with 149 additions and 134 deletions

View File

@@ -4,13 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### v3.X.X - [Unreleased] ### v3.9.3 - [Unreleased]
#### Changed #### Changed
- Updating nginx fastcgi_cache template - Updating nginx fastcgi_cache template
- Updating Nginx configuration for WordPress 5.0 - Updating Nginx configuration for WordPress 5.0
- remove --experimental args - remove --experimental args
- MariaDB version bumped to 10.3
#### Added #### Added
@@ -20,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
#### Fixed #### Fixed
- Nginx variable $webp_suffix on fresh install - Nginx variable $webp_suffix on fresh install
- wo update command
### v3.9.2 - November 30, 2018 ### v3.9.2 - November 30, 2018

View File

@@ -28,7 +28,7 @@
## Key Features ## Key Features
- Easy Migration from EasyEngine v3 - Easy Migration from EasyEngine v3 (migration script development in progress)
- Automated WordPress, Nginx, PHP, MySQL & Redis installation - Automated WordPress, Nginx, PHP, MySQL & Redis installation
- Optimized Nginx configuration with multiple cache backends support - Optimized Nginx configuration with multiple cache backends support
- Let's Encrypt SSL certificates - Let's Encrypt SSL certificates

130
install
View File

@@ -7,8 +7,10 @@
# Copyright (c) 2019 - WordOps # Copyright (c) 2019 - WordOps
# This script is licensed under M.I.T # This script is licensed under M.I.T
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# Version 3.9.1 - 2019-02-25 # Version 3.9.3 - 2019-03-04
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
readonly wo_version_old="2.2.3"
readonly wo_version_new="3.9.3"
# CONTENTS # CONTENTS
# --- # ---
# 1. VARIABLES AND DECLARATIONS # 1. VARIABLES AND DECLARATIONS
@@ -20,19 +22,34 @@
# 1 - Set the CLI output colors # 1 - Set the CLI output colors
### ###
function wo_lib_echo() TPUT_RESET=$(tput sgr0)
{ TPUT_FAIL=$(tput setaf 1)
echo $(tput setaf 4)$@$(tput sgr0)
wo_lib_echo () {
TPUT_ECHO=$(tput setaf 4)
echo "${TPUT_ECHO}${*}${TPUT_RESET}"
} }
function wo_lib_echo_info() wo_lib_echo_info()
{ {
echo $(tput setaf 7)$@$(tput sgr0) TPUT_INFO=$(tput setaf 7)
echo "${TPUT_INFO}${*}${TPUT_RESET}"
} }
function wo_lib_echo_fail() wo_lib_echo_fail()
{ {
echo $(tput setaf 1)$@$(tput sgr0)
echo "${TPUT_FAIL}${*}${TPUT_RESET}"
}
###
# 1 - Capture errors
###
wo_lib_error()
{
echo "[ $(date) ] ${TPUT_FAIL}${*}${TPUT_RESET}"
exit "$2"
} }
### ###
@@ -40,18 +57,13 @@ function wo_lib_echo_fail()
### ###
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
wo_lib_echo_fail "Sudo privilege required..." wo_lib_echo_fail "Sudo privilege required..."
wo_lib_echo_fail "Uses: wget -qO wo wordops.se/tup && sudo bash wo" wo_lib_echo_fail "Use: wget -qO wo wordops.se/tup && sudo bash wo"
exit 100 exit 100
fi fi
### echo ""
# 1 - Capture errors wo_lib_echo "Welcome to WordOps install script v${wo_version_new}"
### echo ""
function wo_lib_error()
{
echo "[ $(date) ] $(tput setaf 1)$@$(tput sgr0)"
exit $2
}
### ###
# 1- Update the apt sewers with fresh info # 1- Update the apt sewers with fresh info
@@ -72,8 +84,6 @@ fi
### ###
wo_branch=$1 wo_branch=$1
migration=0 migration=0
readonly wo_version_old="2.2.3"
readonly wo_version_new="3.9.2.3"
readonly wo_log_dir=/var/log/wo/ readonly wo_log_dir=/var/log/wo/
readonly wo_install_log=/var/log/wo/install.log readonly wo_install_log=/var/log/wo/install.log
readonly wo_linux_distro=$(lsb_release -i | awk '{print $3}') readonly wo_linux_distro=$(lsb_release -i | awk '{print $3}')
@@ -93,7 +103,7 @@ fi
### ###
# 1 - WordOps (wo) only supports Ubuntu/Debian versions that are eligible for support # 1 - WordOps (wo) only supports Ubuntu/Debian versions that are eligible for support
### ###
lsb_release -d | egrep -e "14.04|16.04|18.04|jessie|stretch" &>> /dev/null lsb_release -d | grep -E "14.04|16.04|18.04|jessie|stretch" &>> /dev/null
if [ "$?" -ne "0" ]; then if [ "$?" -ne "0" ]; then
wo_lib_echo_fail "WordOps (wo) only supports Ubuntu 14.04/16.04/18.04, Debian 8.x and Debian 9.x" wo_lib_echo_fail "WordOps (wo) only supports Ubuntu 14.04/16.04/18.04, Debian 8.x and Debian 9.x"
exit 100 exit 100
@@ -115,37 +125,36 @@ fi
### ###
# 2 - Setup the dependencies for installation # 2 - Setup the dependencies for installation
#### ####
function wo_install_dep() wo_install_dep()
{ {
if [ "$wo_linux_distro" == "Ubuntu" ]; then echo -ne ' Installing dependencies [..]\r'
apt-get -y install build-essential curl gzip python3 python3-apt python3-setuptools python3-dev sqlite3 git tar software-properties-common pigz gnupg2 || wo_lib_error "There was an error during dependency installation, exit status " 1 if {
elif [ "$wo_linux_distro" == "Debian" ]; then if [ "$wo_linux_distro" == "Ubuntu" ]; then
apt-get -y install build-essential curl gzip dirmngr python3 python3-apt python3-setuptools python3-dev sqlite3 git tar software-properties-common pigz gnupg2 || wo_lib_error "There was an error during dependency installation, exit status " 1 apt-get -y install build-essential curl gzip python3 python3-apt python3-setuptools python3-dev sqlite3 git tar software-properties-common pigz gnupg2 > /dev/null 2>&1
else
apt-get -y install build-essential curl gzip dirmngr python3 python3-apt python3-setuptools python3-dev sqlite3 git tar software-properties-common pigz gnupg2 > /dev/null 2>&1
fi
}; then echo -ne ' Installing dependencies [OK]\r'
else
echo -e " Installing dependencies [FAIL]"
fi fi
locale-gen en &>> /dev/null locale-gen en &>> /dev/null
# Support PFS # Support PFS
if [ -f /etc/nginx/nginx.conf ]; then if [ -f /etc/nginx/nginx.conf ]; then
# Replace the default ciphers # Replace the default ciphers
sed -i 's/HIGH:!aNULL:!MD5:!kEDH;/ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;/' /etc/nginx/nginx.conf sed -i 's/HIGH:!aNULL:!MD5:!kEDH;/EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES;/' /etc/nginx/nginx.conf
# Replace the EasyEngine ciphers # Replace the EasyEngine ciphers
sed -i 's/ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;/ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;/' /etc/nginx/nginx.conf sed -i 's/ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;/EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES;/' /etc/nginx/nginx.conf
# Change the TLS protocols # Change the TLS protocols
if [ "$wo_distro_version" == "bionic" ]; then sed -i 's/TLSv1 TLSv1.1 TLSv1.2;/TLSv1.2;/g' /etc/nginx/nginx.conf
# Bionic supports TLSv1.3, so let's enable that
sed -i 's/TLSv1 TLSv1.1 TLSv1.2;/TLSv1.2 TLSv1.3;/g' /etc/nginx/nginx.conf
else
# If != Bionic then enable only TLSv1.2
sed -i 's/TLSv1 TLSv1.1 TLSv1.2;/TLSv1.2;/g' /etc/nginx/nginx.conf
fi
fi fi
if [ "$wo_linux_distro" == "Ubuntu" ]; then if [ "$wo_linux_distro" == "Ubuntu" ]; then
add-apt-repository -y 'ppa:ondrej/php' add-apt-repository -y 'ppa:ondrej/php'
wo_lib_echo "Updating the PHP repository for some neat PHP 7.2 support" wo_lib_echo "Updating the PHP repository for some neat PHP 7.2 support"
apt-get update &>> /dev/null apt-get update &>> /dev/null
apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php-memcached php7.2-imap php7.2-common php7.2-readline php-redis php7.2-mysql php7.2-cli php-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php7.2-msgpack graphviz php-pear php7.2-xdebug || wo_lib_error "Not all PHP packages could be installed. " 1 apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php-memcached php7.2-imap php7.2-common php7.2-readline php-redis php7.2-mysql php7.2-cli php-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php-msgpack graphviz php-pear php-xdebug || wo_lib_error "Not all PHP packages could be installed. " 1
mkdir -p /var/log/php/7.2/ mkdir -p /var/log/php/7.2/
touch /var/log/php/7.2/slow.log /var/log/php/7.2/fpm.log touch /var/log/php/7.2/slow.log /var/log/php/7.2/fpm.log
systemctl php7.2-fpm restart &>> /dev/null systemctl php7.2-fpm restart &>> /dev/null
@@ -157,7 +166,7 @@ function wo_install_dep()
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
apt-get update &>> /dev/null apt-get update &>> /dev/null
apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php-memcached php7.2-imap php7.2-common php7.2-readlne php-redis php7.2-mysql php7.2-cli php-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php7.2-msgpack graphviz php-pear php7.2-xdebug || wo_lib_error "Not all PHP packages could be installed." 1 apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php-memcached php7.2-imap php7.2-common php7.2-readlne php-redis php7.2-mysql php7.2-cli php-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php-msgpack graphviz php-pear php-xdebug || wo_lib_error "Not all PHP packages could be installed." 1
systemctl php7.2-fpm restart &>> /dev/null systemctl php7.2-fpm restart &>> /dev/null
fi fi
@@ -179,7 +188,7 @@ function wo_install_dep()
### ###
# 3 - Create/migrate the essentials # 3 - Create/migrate the essentials
### ###
function wo_sync_db() wo_sync_db()
{ {
### ###
# Switching from EE -> WO # Switching from EE -> WO
@@ -232,7 +241,7 @@ function wo_sync_db()
# Check site is enable/live or disable # Check site is enable/live or disable
for site in $(ls /etc/nginx/sites-available/ | grep -v default); for site in $(ls /etc/nginx/sites-available/ | grep -v default);
do do
if [ -f /etc/nginx/sites-enabled/$site ]; then if [ -f "/etc/nginx/sites-enabled/$site" ]; then
wo_site_status='1' wo_site_status='1'
else else
wo_site_status='0' wo_site_status='0'
@@ -349,7 +358,7 @@ function wo_sync_db()
} }
# Once again, set the proper ACL on the WordOps configuration directory # Once again, set the proper ACL on the WordOps configuration directory
function secure_wo_db() secure_wo_db()
{ {
# The owner is root # The owner is root
chown -R root:root /var/lib/wo/ chown -R root:root /var/lib/wo/
@@ -358,7 +367,7 @@ function secure_wo_db()
} }
# Update the WP-CLI version # Update the WP-CLI version
function wo_update_wp_cli() wo_update_wp_cli()
{ {
wo_lib_echo "Updating WP-CLI version to resolve compatibility issue." wo_lib_echo "Updating WP-CLI version to resolve compatibility issue."
WP_CLI_PATH=$(command -v wp) WP_CLI_PATH=$(command -v wp)
@@ -369,18 +378,19 @@ function wo_update_wp_cli()
else else
wget -qO /usr/local/bin/wp https://raw.githubusercontent.com/WordOps/wpcli-builds/gh-pages/phar/wp-cli.phar wget -qO /usr/local/bin/wp https://raw.githubusercontent.com/WordOps/wpcli-builds/gh-pages/phar/wp-cli.phar
chmod +x /usr/local/bin/wp chmod +x /usr/local/bin/wp
ln -s /usr/local/bin/wp /usr/bin/
fi fi
[ -d /etc/bash_completion ] && { [ -d /etc/bash_completion.d ] && {
wget -qO /etc/bash_completion.d/wp-completion.bash https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash wget -qO /etc/bash_completion.d/wp-completion.bash https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash
} }
} }
# Now, finally, let's install WordOps # Now, finally, let's install WordOps
function wo_install() wo_install()
{ {
rm -rf /tmp/easyengine &>> /dev/null rm -rf /tmp/easyengine
rm -rf /tmp/wordops &>> /dev/null rm -rf /tmp/wordops
wo_lib_echo "Downloading WordOps straight from GitHub - fresh and brewed with love. Hold your horses..." wo_lib_echo "Downloading WordOps straight from GitHub - fresh and brewed with love. Hold your horses..."
[ -z "$wo_branch" ] && { [ -z "$wo_branch" ] && {
@@ -395,7 +405,7 @@ function wo_install()
python3 setup.py install || wo_lib_error "An error was encountered during the installation, exit status " $? python3 setup.py install || wo_lib_error "An error was encountered during the installation, exit status " $?
} }
function wo_update_latest() wo_update_latest()
{ {
if [ -f /etc/nginx/fastcgi_params ] if [ -f /etc/nginx/fastcgi_params ]
@@ -628,7 +638,7 @@ function wo_update_latest()
add-apt-repository -y 'ppa:ondrej/php' add-apt-repository -y 'ppa:ondrej/php'
wo_lib_echo "Updating the PHP repository for some neat PHP 7.2 support" wo_lib_echo "Updating the PHP repository for some neat PHP 7.2 support"
apt-get update &>> /dev/null apt-get update &>> /dev/null
apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php7.2-imap php-memcached php7.2-common php7.2-readline php-redis php7.2-mysql php7.2-cli php-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php7.2-msgpack graphviz php-pear php7.2-xdebug || wo_lib_error "Not all PHP packages could be installed. " 1 apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php7.2-imap php-memcached php7.2-common php7.2-readline php-redis php7.2-mysql php7.2-cli php-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php-msgpack graphviz php-pear php-xdebug || wo_lib_error "Not all PHP packages could be installed. " 1
mkdir -p /var/log/php/7.2/ mkdir -p /var/log/php/7.2/
touch /var/log/php/7.2/slow.log /var/log/php/7.2/fpm.log touch /var/log/php/7.2/slow.log /var/log/php/7.2/fpm.log
systemctl php7.2-fpm restart &>> /dev/null systemctl php7.2-fpm restart &>> /dev/null
@@ -640,7 +650,7 @@ function wo_update_latest()
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
apt-get update &>> /dev/null apt-get update &>> /dev/null
apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php7.2-imap php-memcached php7.2-common php7.2-readline php-redis php7.2-mysql php7.2-cli php-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php7.2-msgpack graphviz php-pear php7.2-xdebug || wo_lib_error "Not all PHP packages could be installed." 1 apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php7.2-imap php-memcached php7.2-common php7.2-readline php-redis php7.2-mysql php7.2-cli php-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php-msgpack graphviz php-pear php-xdebug || wo_lib_error "Not all PHP packages could be installed." 1
systemctl php7.2-fpm restart &>> /dev/null systemctl php7.2-fpm restart &>> /dev/null
fi fi
@@ -654,7 +664,7 @@ function wo_update_latest()
} }
# Do git intialisation # Do git intialisation
function wo_git_init() wo_git_init()
{ {
# Nginx under git version control # Nginx under git version control
[ -d /etc/nginx ] && { [ -d /etc/nginx ] && {
@@ -684,17 +694,19 @@ function wo_git_init()
}> /dev/null }> /dev/null
} }
if [ ! -f /usr/local/bin/wo ]; then if [ ! -x /usr/local/bin/ee ]; then
wo_lib_echo "Installing depedencies" | tee -ai $wo_install_log if [ ! -x /usr/local/bin/wo ]; then
wo_install_dep | tee -ai $wo_install_log wo_lib_echo "Installing depedencies" | tee -ai $wo_install_log
wo_lib_echo "Installing WordOps $wo_branch" | tee -ai $wo_install_log wo_install_dep | tee -ai $wo_install_log
wo_install | tee -ai $wo_install_log wo_lib_echo "Installing WordOps $wo_branch" | tee -ai $wo_install_log
wo_lib_echo "Running post-install steps" | tee -ai $wo_install_log wo_install | tee -ai $wo_install_log
secure_wo_db | tee -ai $EE_INSTALL_LOG wo_lib_echo "Running post-install steps" | tee -ai $wo_install_log
wo_git_init | tee -ai $wo_install_log secure_wo_db | tee -ai $EE_INSTALL_LOG
wo_git_init | tee -ai $wo_install_log
wo_update_wp_cli | tee -ai $wo_install_log
fi
else else
ee -v 2>&1 | grep $wo_version_new &>> /dev/null wo -v 2>&1 | grep $wo_version_new &>> /dev/null
if [[ $? -ne 0 ]];then if [[ $? -ne 0 ]];then
read -p "Update WordOps to $wo_version_new (y/n): " wo_ans read -p "Update WordOps to $wo_version_new (y/n): " wo_ans
if [ "$wo_ans" = "y" ] || [ "$wo_ans" = "Y" ]; then if [ "$wo_ans" = "y" ] || [ "$wo_ans" = "Y" ]; then

View File

@@ -55,10 +55,10 @@ except Exception as e:
os.system("git config --global user.email {0}".format(wo_email)) os.system("git config --global user.email {0}".format(wo_email))
if not os.path.isfile('/root/.gitconfig'): if not os.path.isfile('/root/.gitconfig'):
shutil.copy2(os.path.expanduser("~")+'/.gitconfig', '/root/.gitconfig') shutil.copy2(os.path.expanduser("~")+'/.gitconfig', '/root/.gitconfig')
setup(name='wo', setup(name='wo',
version='3.9.1', version='3.9.3',
description=long_description, description=long_description,
long_description=long_description, long_description=long_description,
classifiers=[], classifiers=[],

View File

@@ -18,13 +18,14 @@ fastcgi_read_timeout 300;
client_max_body_size 100m; client_max_body_size 100m;
# SSL Settings # SSL Settings
ssl_protocols TLSv1.1 TLSv1.2; ssl_protocols TLSv1.2;
ssl_session_cache shared:SSL:10m; ssl_ciphers 'EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES';
ssl_session_timeout 10m; ssl_session_cache shared:SSL:50m;
ssl_session_timeout 1d;
ssl_session_tickets off;
{{#Ubuntu}} {{#Ubuntu}}
ssl_prefer_server_ciphers on; ssl_prefer_server_ciphers on;
{{/Ubuntu}} {{/Ubuntu}}
ssl_ciphers "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
# Log format Settings # Log format Settings
log_format rt_cache '$remote_addr $upstream_response_time $upstream_cache_status [$time_local] ' log_format rt_cache '$remote_addr $upstream_response_time $upstream_cache_status [$time_local] '

View File

@@ -11,11 +11,11 @@ import datetime
class WOVariables(): class WOVariables():
"""Intialization of core variables""" """Intialization of core variables"""
# WordOps version # WordOps version
wo_version = "3.9.2" wo_version = "3.9.3"
# WordOps packages versions # WordOps packages versions
wo_wp_cli = "2.0.1" wo_wp_cli = "2.1.0"
wo_adminer = "4.6.3" wo_adminer = "4.7.1"
# Get WPCLI path # Get WPCLI path
wo_wpcli_path = os.popen('which wp | tr "\n" " "').read() wo_wpcli_path = os.popen('which wp | tr "\n" " "').read()
@@ -68,9 +68,9 @@ class WOVariables():
wo_mysql_host = "" wo_mysql_host = ""
config = configparser.RawConfigParser() config = configparser.RawConfigParser()
if os.path.exists('/etc/mysql/conf.d/my.cnf'): if os.path.exists('/etc/mysql/conf.d/my.cnf'):
cnfpath = "/etc/mysql/conf.d/my.cnf" cnfpath = "/etc/mysql/conf.d/my.cnf"
else: else:
cnfpath = os.path.expanduser("~")+"/.my.cnf" cnfpath = os.path.expanduser("~")+"/.my.cnf"
if [cnfpath] == config.read(cnfpath): if [cnfpath] == config.read(cnfpath):
try: try:
wo_mysql_host = config.get('client', 'host') wo_mysql_host = config.get('client', 'host')
@@ -104,15 +104,15 @@ class WOVariables():
if wo_platform_distro == 'ubuntu': if wo_platform_distro == 'ubuntu':
if (wo_platform_codename == 'trusty' or wo_platform_codename == 'xenial' or wo_platform_codename == 'bionic'): if (wo_platform_codename == 'trusty' or wo_platform_codename == 'xenial' or wo_platform_codename == 'bionic'):
wo_php_repo = "ppa:ondrej/php" wo_php_repo = "ppa:ondrej/php"
wo_php = ["php7.2-fpm", "php-sodium", "php7.2-curl", "php7.2-gd", "php7.2-imap", wo_php = ["php7.2-fpm", "php7.2-curl", "php7.2-gd", "php7.2-imap",
"php7.2-readline", "php7.2-common", "php7.2-recode", "php7.2-readline", "php7.2-common", "php7.2-recode",
"php7.2-cli", "php7.2-mbstring", "php7.2-cli", "php7.2-mbstring",
"php7.2-bcmath", "php7.2-mysql", "php7.2-opcache", "php7.2-zip", "php7.2-xml", "php7.2-soap"] "php7.2-bcmath", "php7.2-mysql", "php7.2-opcache", "php7.2-zip", "php7.2-xml", "php7.2-soap"]
wo_php72 = ["php7.2-fpm", "php-sodium", "php7.2-curl", "php7.2-gd", "php7.2-imap", wo_php72 = ["php7.2-fpm", "php7.2-curl", "php7.2-gd", "php7.2-imap",
"php7.2-readline", "php7.2-common", "php7.2-recode", "php7.2-readline", "php7.2-common", "php7.2-recode",
"php7.2-cli", "php7.2-mbstring", "php7.2-cli", "php7.2-mbstring",
"php7.2-bcmath", "php7.2-mysql", "php7.2-opcache", "php7.2-zip", "php7.2-xml", "php7.2-soap"] "php7.2-bcmath", "php7.2-mysql", "php7.2-opcache", "php7.2-zip", "php7.2-xml", "php7.2-soap"]
wo_php_extra = ["php-memcached", "php-imagick", "php-memcache", "memcached", wo_php_extra = ["php-memcached", "php-imagick", "memcached",
"graphviz", "php-pear", "php-xdebug", "php-msgpack", "php-redis"] "graphviz", "php-pear", "php-xdebug", "php-msgpack", "php-redis"]
elif wo_platform_distro == 'debian': elif wo_platform_distro == 'debian':
wo_php_repo = ("deb https://packages.sury.org/php/ {codename} main".format(codename=wo_platform_codename)) wo_php_repo = ("deb https://packages.sury.org/php/ {codename} main".format(codename=wo_platform_codename))
@@ -162,7 +162,7 @@ class WOVariables():
.format(codename=wo_platform_codename)) .format(codename=wo_platform_codename))
if (wo_platform_codename == 'trusty' or wo_platform_codename == 'xenial' or wo_platform_codename == 'bionic' or wo_platform_distro == 'debian'): if (wo_platform_codename == 'trusty' or wo_platform_codename == 'xenial' or wo_platform_codename == 'bionic' or wo_platform_distro == 'debian'):
wo_redis = ['redis-server', 'php7.2-redis'] wo_redis = ['redis-server', 'php-redis']
# Repo path # Repo path
wo_repo_file = "wo-repo.list" wo_repo_file = "wo-repo.list"