Fix duplicated location after wo upgrade
This commit is contained in:
@@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
|
||||
### v3.9.6 - [Unreleased]
|
||||
|
||||
#### Added
|
||||
|
||||
- New Nginx package on Ubuntu with TLS v1.3 support (OpenSSL 1.1.1c)
|
||||
|
||||
#### Changed
|
||||
|
||||
- phpRedisAdmin is now installed with the stack "--admin"
|
||||
@@ -17,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
#### Fixed
|
||||
|
||||
- phpRedisAdmin installation
|
||||
- Duplicated locations /robots.txt after upgrade to v3.9.5.3
|
||||
|
||||
### v3.9.5.3 - 2019-06-18
|
||||
|
||||
|
||||
16
install
16
install
@@ -7,10 +7,10 @@
|
||||
# Copyright (c) 2019 - WordOps
|
||||
# This script is licensed under M.I.T
|
||||
# -------------------------------------------------------------------------
|
||||
# Version 3.9.5.3 - 2019-06-18
|
||||
# Version 3.9.5.4 - 2019-07-09
|
||||
# -------------------------------------------------------------------------
|
||||
readonly wo_version_old="2.2.3"
|
||||
readonly wo_version_new="3.9.5.3"
|
||||
readonly wo_version_new="3.9.5.4"
|
||||
# CONTENTS
|
||||
# ---
|
||||
# 1. VARIABLES AND DECLARATIONS
|
||||
@@ -178,14 +178,10 @@ wo_install_dep() {
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y dist-upgrade
|
||||
} > /dev/null 2>&1
|
||||
if [ "$wo_linux_distro" == "Ubuntu" ]; then
|
||||
# add nginx repository gpg key
|
||||
wget https://download.opensuse.org/repositories/home:virtubox:WordOps/xUbuntu_"$wo_distro_id"/Release.key -O Release.key
|
||||
apt-key add - < Release.key
|
||||
rm -f Release.key
|
||||
# install dependencies
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install build-essential curl gzip python3 python3-apt python3-setuptools python3-dev sqlite3 git tar software-properties-common pigz gnupg2 cron ccze rsync tree haveged ufw > /dev/null 2>&1
|
||||
else
|
||||
# add nginx repository gpg ke
|
||||
# add nginx repository gpg key
|
||||
wget https://download.opensuse.org/repositories/home:virtubox:WordOps/Debian_9.0/Release.key -O Release.key
|
||||
apt-key add - < Release.key
|
||||
rm -f Release.key
|
||||
@@ -344,7 +340,7 @@ wo_update_wp_cli() {
|
||||
[ ! -h /usr/bin/wp ] && {
|
||||
ln -s /usr/local/bin/wp /usr/bin/
|
||||
}
|
||||
[ ! -f /etc/bash_completion.d/wp-completion.bash ] && {
|
||||
[ -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
|
||||
}
|
||||
} >> "$wo_install_log" 2>&1
|
||||
@@ -491,6 +487,10 @@ wo_upgrade_nginx() {
|
||||
|
||||
# restore sites and configuration
|
||||
/usr/bin/rsync -auz /var/lib/wo-backup/nginx/ /etc/nginx/
|
||||
sed -i "s/locations.conf/locations-wo.conf/" /etc/nginx/sites-available/*
|
||||
sed -i "s/locations-php7.conf/locations-wo.conf/" /etc/nginx/sites-available/*
|
||||
sed -i "s/locations-php72.conf/locations-wo.conf/" /etc/nginx/sites-available/*
|
||||
sed -i "s/locations-php73.conf/locations-wo.conf/" /etc/nginx/sites-available/*
|
||||
|
||||
# update redis.conf headers
|
||||
if [ -f /etc/nginx/common/redis.conf ]; then
|
||||
|
||||
@@ -1072,23 +1072,24 @@ class WOStackController(CementBaseController):
|
||||
WOGit.add(self, ["/etc/mysql"], msg="Adding MySQL into Git")
|
||||
WOService.reload_service(self, 'mysql')
|
||||
|
||||
# create fail2ban configuration files
|
||||
if set(WOVariables.wo_fail2ban).issubset(set(apt_packages)):
|
||||
if not os.path.isfile("/etc/fail2ban/jail.d/custom.conf"):
|
||||
data = dict()
|
||||
Log.debug(self, "Setting up fail2ban jails configuration")
|
||||
wo_fail2ban = open('/etc/fail2ban/jail.d/custom.conf',
|
||||
encoding='utf-8', mode='w')
|
||||
self.app.render((data), 'fail2ban.mustache',
|
||||
out=wo_fail2ban)
|
||||
wo_fail2ban.close()
|
||||
# create fail2ban configuration files
|
||||
if set(WOVariables.wo_fail2ban).issubset(set(apt_packages)):
|
||||
if not os.path.isfile("/etc/fail2ban/jail.d/custom.conf"):
|
||||
data = dict()
|
||||
Log.debug(self, "Setting up fail2ban jails configuration")
|
||||
wo_fail2ban = open('/etc/fail2ban/jail.d/custom.conf',
|
||||
encoding='utf-8', mode='w')
|
||||
self.app.render((data), 'fail2ban.mustache',
|
||||
out=wo_fail2ban)
|
||||
wo_fail2ban.close()
|
||||
|
||||
Log.debug(self, "Setting up fail2ban wp filter")
|
||||
wo_fail2ban = open('/etc/fail2ban/filter.d/wo-wordpress.conf',
|
||||
encoding='utf-8', mode='w')
|
||||
self.app.render((data), 'fail2ban-wp.mustache',
|
||||
out=wo_fail2ban)
|
||||
wo_fail2ban.close()
|
||||
Log.debug(self, "Setting up fail2ban wp filter")
|
||||
wo_fail2ban = open('/etc/fail2ban/filter.d/'
|
||||
'wo-wordpress.conf',
|
||||
encoding='utf-8', mode='w')
|
||||
self.app.render((data), 'fail2ban-wp.mustache',
|
||||
out=wo_fail2ban)
|
||||
wo_fail2ban.close()
|
||||
|
||||
if (packages):
|
||||
if any('/usr/local/bin/wp' == x[1] for x in packages):
|
||||
@@ -1424,6 +1425,7 @@ class WOStackController(CementBaseController):
|
||||
if self.app.pargs.all:
|
||||
self.app.pargs.web = True
|
||||
self.app.pargs.admin = True
|
||||
self.app.pargs.php73 = True
|
||||
|
||||
if self.app.pargs.web:
|
||||
self.app.pargs.nginx = True
|
||||
@@ -1766,6 +1768,8 @@ class WOStackController(CementBaseController):
|
||||
self.app.pargs.phpmyadmin = True
|
||||
self.app.pargs.composer = True
|
||||
self.app.pargs.utils = True
|
||||
self.app.pargs.netdata = True
|
||||
|
||||
# NGINX
|
||||
if self.app.pargs.nginx:
|
||||
if WOAptGet.is_installed(self, 'nginx-custom'):
|
||||
|
||||
Reference in New Issue
Block a user