update nginx-build

This commit is contained in:
VirtuBox
2019-03-10 18:45:32 +01:00
parent 17b69ae306
commit a58f157e70
4 changed files with 27 additions and 17 deletions

View File

@@ -8,7 +8,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
#### Changed
-
- Update WP-CLI version to 2.1.0
- Update Adminer to 4.6.2
- Update Nginx-build
#### Fixed

12
install
View File

@@ -128,9 +128,9 @@ wo_install_dep()
{
if [ "$wo_linux_distro" == "Ubuntu" ]; then
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
apt-get -y install build-essential curl gzip python3 python3-apt python3-setuptools python3-dev sqlite3 git tar software-properties-common pigz gnupg2 fail2ban > /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
apt-get -y install build-essential curl gzip dirmngr sudo python3 python3-apt python3-setuptools python3-dev sqlite3 git tar software-properties-common pigz gnupg2 fail2ban > /dev/null 2>&1
fi
locale-gen en
@@ -321,15 +321,15 @@ secure_wo_db()
# Update the WP-CLI version
wo_update_wp_cli()
{
{
WP_CLI_PATH=$(command -v wp)
if [ "$WP_CLI_PATH" != "/usr/local/bin/wp" ]; then
rm -rf "$WP_CLI_PATH"
# Update WP-CLI to the most recent version
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/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x /usr/local/bin/wp
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/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x /usr/local/bin/wp
fi
[ ! -x /usr/bin/wp ] && {
@@ -338,6 +338,8 @@ wo_update_wp_cli()
[ -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
}
wp --allow-root cli update
} >> /var/log/wo/install.log 2>&1
}
# Now, finally, let's install WordOps

View File

@@ -151,7 +151,14 @@ class WOStackController(CementBaseController):
Log.info(self, "Adding repository for NGINX, please wait...")
WORepo.add(self, repo_url=WOVariables.wo_nginx_repo)
Log.debug(self, 'Adding ppa of Nginx')
WORepo.add_key(self, WOVariables.wo_nginx_key)
try:
WOShellExec.cmd_exec(self, "wget -qO - https://build"
".opensuse.org/"
"projects/home:virtubox/public_key"
" | sudo apt-key add -", log=False)
except CommandExecutionError as e:
Log.error("Failed to add Nginx repository key")
if (WOVariables.wo_platform_distro == 'ubuntu'):
if set(WOVariables.wo_php73).issubset(set(apt_packages)) \
@@ -226,7 +233,7 @@ class WOStackController(CementBaseController):
"add_header")
WOFileUtils.searchreplace(self, "/etc/nginx/nginx.conf",
"\"EasyEngine\"",
"\"WordOps\"",
"\"WordOps v{0}\""
.format(WOVariables.wo_version))
WOFileUtils.searchreplace(self, '/etc/nginx/nginx.conf',

View File

@@ -83,22 +83,22 @@ class WOVariables():
# Nginx repo and packages
if wo_platform_codename == 'trusty':
wo_nginx_repo = ("deb http://download.opensuse.org/repositories/home:"
"/rtCamp:/EasyEngine/xUbuntu_14.04/ /")
"/virtubox:/WordOps/xUbuntu_14.04/ /")
elif wo_platform_codename == 'xenial':
wo_nginx_repo = ("deb http://download.opensuse.org/repositories/home:"
"/rtCamp:/EasyEngine/xUbuntu_16.04/ /")
"/virtubox:/WordOps/xUbuntu_16.04/ /")
elif wo_platform_codename == 'bionic':
wo_nginx_repo = ("deb http://download.opensuse.org/repositories/home:"
"/rtCamp:/EasyEngine/xUbuntu_18.04/ /")
"/virtubox:/WordOps/xUbuntu_18.04/ /")
elif wo_platform_codename == 'jessie':
wo_nginx_repo = ("deb http://download.opensuse.org/repositories/home:"
"/rtCamp:/EasyEngine/Debian_8.0/ /")
"/virtubox:/WordOps/Debian_8.0/ /")
elif wo_platform_codename == 'stretch':
wo_nginx_repo = ("deb http://download.opensuse.org/repositories/home:"
"/rtCamp:/EasyEngine/Debian_8.0/ /")
"/virtubox:/WordOps/Debian_9.0/ /")
wo_nginx = ["nginx-custom", "nginx-ee"]
wo_nginx_key = '3050AC3CD2AE6F03'
wo_nginx_key = '188C9FB063F0247A'
# PHP repo and packages
if wo_platform_distro == 'ubuntu':
@@ -148,9 +148,8 @@ class WOVariables():
# HHVM repo details
if wo_platform_distro == 'ubuntu':
if wo_platform_codename == "trusty" or wo_platform_codename == "xenial" or wo_platform_codename == "bionic":
wo_hhvm_repo = ("deb http://dl.hhvm.com/ubuntu {codename} main"
.format(codename=wo_platform_codename))
wo_hhvm_repo = ("deb http://dl.hhvm.com/ubuntu {codename} main"
.format(codename=wo_platform_codename))
else:
wo_hhvm_repo = ("deb http://dl.hhvm.com/debian {codename} main"
.format(codename=wo_platform_codename))