Fix migration from EE with custom nginx-ee
This commit is contained in:
2
install
2
install
@@ -494,6 +494,7 @@ wo_upgrade_nginx() {
|
|||||||
# install new nginx package
|
# install new nginx package
|
||||||
if [ -n "$CHECK_NGINX_EE" ]; then
|
if [ -n "$CHECK_NGINX_EE" ]; then
|
||||||
if [ -x /usr/local/bin/wo ]; then
|
if [ -x /usr/local/bin/wo ]; then
|
||||||
|
[ -f /etc/apt/preferences.d/nginx-block ] && { mv /etc/apt/preferences.d/nginx-block .;}
|
||||||
# stop nginx
|
# stop nginx
|
||||||
service nginx stop
|
service nginx stop
|
||||||
# remove previous package
|
# remove previous package
|
||||||
@@ -544,6 +545,7 @@ wo_upgrade_nginx() {
|
|||||||
systemctl stop nginx
|
systemctl stop nginx
|
||||||
systemctl start nginx
|
systemctl start nginx
|
||||||
fi
|
fi
|
||||||
|
[ -f ./nginx-block ] && { mv nginx-block /etc/apt/preferences.d/nginx-block ;}
|
||||||
|
|
||||||
} \
|
} \
|
||||||
>> "$wo_install_log" 2>&1
|
>> "$wo_install_log" 2>&1
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ class WOStackController(CementBaseController):
|
|||||||
dict(help='Install PHP 7.3 stack', action='store_true')),
|
dict(help='Install PHP 7.3 stack', action='store_true')),
|
||||||
(['--mysql'],
|
(['--mysql'],
|
||||||
dict(help='Install MySQL stack', action='store_true')),
|
dict(help='Install MySQL stack', action='store_true')),
|
||||||
|
(['--mariabackup'],
|
||||||
|
dict(help='Install MariaBackup stack', action='store_true')),
|
||||||
(['--mysqlclient'],
|
(['--mysqlclient'],
|
||||||
dict(help='Install MySQL client for remote MySQL server',
|
dict(help='Install MySQL client for remote MySQL server',
|
||||||
action='store_true')),
|
action='store_true')),
|
||||||
@@ -79,6 +81,8 @@ class WOStackController(CementBaseController):
|
|||||||
action='store_true')),
|
action='store_true')),
|
||||||
(['--dashboard'],
|
(['--dashboard'],
|
||||||
dict(help='Install WordOps dashboard', action='store_true')),
|
dict(help='Install WordOps dashboard', action='store_true')),
|
||||||
|
(['--extplorer'],
|
||||||
|
dict(help='Install eXtplorer file manager', action='store_true')),
|
||||||
(['--adminer'],
|
(['--adminer'],
|
||||||
dict(help='Install Adminer stack', action='store_true')),
|
dict(help='Install Adminer stack', action='store_true')),
|
||||||
(['--fail2ban'],
|
(['--fail2ban'],
|
||||||
@@ -119,6 +123,7 @@ class WOStackController(CementBaseController):
|
|||||||
and (not pargs.mysqlclient) and (not pargs.mysqltuner) and
|
and (not pargs.mysqlclient) and (not pargs.mysqltuner) and
|
||||||
(not pargs.adminer) and (not pargs.utils) and
|
(not pargs.adminer) and (not pargs.utils) and
|
||||||
(not pargs.redis) and (not pargs.proftpd) and
|
(not pargs.redis) and (not pargs.proftpd) and
|
||||||
|
(not pargs.extplorer) and (not pargs.mariabackup) and
|
||||||
(not pargs.phpredisadmin) and
|
(not pargs.phpredisadmin) and
|
||||||
(not pargs.php73)):
|
(not pargs.php73)):
|
||||||
pargs.web = True
|
pargs.web = True
|
||||||
@@ -139,17 +144,13 @@ class WOStackController(CementBaseController):
|
|||||||
pargs.wpcli = True
|
pargs.wpcli = True
|
||||||
|
|
||||||
if pargs.admin:
|
if pargs.admin:
|
||||||
pargs.nginx = True
|
pargs.web = True
|
||||||
pargs.php = True
|
|
||||||
pargs.mysql = True
|
|
||||||
pargs.adminer = True
|
pargs.adminer = True
|
||||||
pargs.phpmyadmin = True
|
pargs.phpmyadmin = True
|
||||||
pargs.composer = True
|
|
||||||
pargs.utils = True
|
pargs.utils = True
|
||||||
pargs.netdata = True
|
pargs.netdata = True
|
||||||
pargs.dashboard = True
|
pargs.dashboard = True
|
||||||
pargs.phpredisadmin = True
|
pargs.phpredisadmin = True
|
||||||
pargs.mysqltuner = True
|
|
||||||
|
|
||||||
if pargs.security:
|
if pargs.security:
|
||||||
pargs.fail2ban = True
|
pargs.fail2ban = True
|
||||||
@@ -213,6 +214,8 @@ class WOStackController(CementBaseController):
|
|||||||
|
|
||||||
# MariaDB 10.3
|
# MariaDB 10.3
|
||||||
if pargs.mysql:
|
if pargs.mysql:
|
||||||
|
pargs.mariabackup = True
|
||||||
|
pargs.mysqltuner = True
|
||||||
Log.debug(self, "Setting apt_packages variable for MySQL")
|
Log.debug(self, "Setting apt_packages variable for MySQL")
|
||||||
if not WOShellExec.cmd_exec(self, "mysqladmin ping"):
|
if not WOShellExec.cmd_exec(self, "mysqladmin ping"):
|
||||||
apt_packages = apt_packages + WOVariables.wo_mysql
|
apt_packages = apt_packages + WOVariables.wo_mysql
|
||||||
@@ -222,6 +225,12 @@ class WOStackController(CementBaseController):
|
|||||||
"for MySQL Client")
|
"for MySQL Client")
|
||||||
apt_packages = apt_packages + WOVariables.wo_mysql_client
|
apt_packages = apt_packages + WOVariables.wo_mysql_client
|
||||||
|
|
||||||
|
if pargs.mariabackup:
|
||||||
|
if not WOAptGet.is_installed(self, 'mariadb-backup'):
|
||||||
|
Log.debug(self, "Setting apt_packages variable "
|
||||||
|
"for MariaBackup")
|
||||||
|
apt_packages = apt_packages + ["mariadb-backup"]
|
||||||
|
|
||||||
# WP-CLI
|
# WP-CLI
|
||||||
if pargs.wpcli:
|
if pargs.wpcli:
|
||||||
Log.debug(self, "Setting packages variable for WP-CLI")
|
Log.debug(self, "Setting packages variable for WP-CLI")
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ def pre_pref(self, apt_packages):
|
|||||||
"""Pre settings to do before installation packages"""
|
"""Pre settings to do before installation packages"""
|
||||||
|
|
||||||
if (set(WOVariables.wo_mysql).issubset(set(apt_packages)) or
|
if (set(WOVariables.wo_mysql).issubset(set(apt_packages)) or
|
||||||
set(WOVariables.wo_mysql_client).issubset(set(apt_packages))):
|
set(WOVariables.wo_mysql_client).issubset(set(apt_packages)) or
|
||||||
|
set(['mariadb-backup']).issubset(set(apt_packages))):
|
||||||
# add mariadb repository excepted on raspbian and ubuntu 19.04
|
# add mariadb repository excepted on raspbian and ubuntu 19.04
|
||||||
if (not WOVariables.wo_distro == 'raspbian'):
|
if (not WOVariables.wo_distro == 'raspbian'):
|
||||||
Log.info(self, "Adding repository for MySQL, please wait...")
|
Log.info(self, "Adding repository for MySQL, please wait...")
|
||||||
@@ -1182,7 +1183,8 @@ def post_pref(self, apt_packages, packages):
|
|||||||
.format(WOVariables.wo_webroot),
|
.format(WOVariables.wo_webroot),
|
||||||
"$cfg[\'Servers\'][$i][\'host\']"
|
"$cfg[\'Servers\'][$i][\'host\']"
|
||||||
" = \'localhost\';", "$cfg"
|
" = \'localhost\';", "$cfg"
|
||||||
"[\'Servers\'][$i][\'host\'] = \'{0}\';"
|
"[\'Servers\'][$i][\'host\'] "
|
||||||
|
"= \'{0}\';"
|
||||||
.format(WOVariables.wo_mysql_host))
|
.format(WOVariables.wo_mysql_host))
|
||||||
Log.debug(self, 'Setting Privileges of webroot permission to '
|
Log.debug(self, 'Setting Privileges of webroot permission to '
|
||||||
'{0}22222/htdocs/db/pma file '
|
'{0}22222/htdocs/db/pma file '
|
||||||
|
|||||||
Reference in New Issue
Block a user