Fix mariadb-backup install
This commit is contained in:
@@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
|
|
||||||
### v3.9.x - [Unreleased]
|
### v3.9.x - [Unreleased]
|
||||||
|
|
||||||
|
### v3.9.8.10 - 2019-09-04
|
||||||
|
|
||||||
#### Changed
|
#### Changed
|
||||||
|
|
||||||
- Improve Let's Encrypt certificate issuance logging informations
|
- Improve Let's Encrypt certificate issuance logging informations
|
||||||
@@ -17,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
- Fix cheat.sh install [PR #139](https://github.com/WordOps/WordOps/pull/139)
|
- Fix cheat.sh install [PR #139](https://github.com/WordOps/WordOps/pull/139)
|
||||||
- sslutils error when trying to display SSL certificate expiration
|
- sslutils error when trying to display SSL certificate expiration
|
||||||
- Fix cheat.sh symbolic link check before creation
|
- Fix cheat.sh symbolic link check before creation
|
||||||
|
- subdomain detection with complex suffixes like com.br
|
||||||
|
|
||||||
### v3.9.8.9 - 2019-09-03
|
### v3.9.8.9 - 2019-09-03
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<br><img src="https://netdata.wordops.eu/netdata/api/v1/badge.svg?chart=web_log_wops.cc.requests_per_url&options=unaligned&dimensions=download&group=sum&after=-86400&label=today&units=installations&precision=0&value_color=%230055AA" alt="WordOps install" >
|
<br><img src="https://netdata.wordops.eu/netdata/api/v1/badge.svg?chart=web_log_wops.cc.requests_per_url&options=unaligned&dimensions=download&group=sum&after=-86400&label=today&units=installations&precision=0&value_color=%230055AA" alt="WordOps install" >
|
||||||
<a href="https://www.codacy.com/app/VirtuBox/WordOps?utm_source=github.com&utm_medium=referral&utm_content=WordOps/WordOps&utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/fe9100fd2c634de7882ecec17f00a11a" alt="codacy"/></a>
|
<a href="https://www.codacy.com/app/VirtuBox/WordOps?utm_source=github.com&utm_medium=referral&utm_content=WordOps/WordOps&utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/fe9100fd2c634de7882ecec17f00a11a" alt="codacy"/></a>
|
||||||
<a href="https://twitter.com/WordOps_" target="_blank"><img src="https://img.shields.io/badge/twitter-%40WordOps__-blue.svg?style=flat&logo=twitter" alt="Badge Twitter" /></a>
|
<a href="https://twitter.com/WordOps_" target="_blank"><img src="https://img.shields.io/badge/twitter-%40WordOps__-blue.svg?style=flat&logo=twitter" alt="Badge Twitter" /></a>
|
||||||
<a href="https://community.wordops.net/slack" target="_blank"><img src="https://img.shields.io/badge/slack-WordOps-4A154B.svg?style=flat&logo=slack" alt="Badge Slack" /></a>
|
<a href="https://chat.wordops.net" target="_blank"><img src="https://img.shields.io/badge/slack-WordOps-4A154B.svg?style=flat&logo=rocket.chat" alt="Badge Slack" /></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
|
|||||||
2
install
2
install
@@ -9,7 +9,7 @@
|
|||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
# wget -qO wo wops.cc && sudo bash wo
|
# wget -qO wo wops.cc && sudo bash wo
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
# Version 3.9.8.9 - 2019-09-03
|
# Version 3.9.8.10 - 2019-09-04
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
|
|
||||||
# CONTENTS
|
# CONTENTS
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -57,7 +57,7 @@ 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.8.9',
|
version='3.9.8.10',
|
||||||
description=long_description,
|
description=long_description,
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
classifiers=[],
|
classifiers=[],
|
||||||
|
|||||||
@@ -876,7 +876,7 @@ def site_package_check(self, stype):
|
|||||||
if self.app.pargs.wpredis:
|
if self.app.pargs.wpredis:
|
||||||
Log.debug(self, "Setting apt_packages variable for redis")
|
Log.debug(self, "Setting apt_packages variable for redis")
|
||||||
if not WOAptGet.is_installed(self, 'redis-server'):
|
if not WOAptGet.is_installed(self, 'redis-server'):
|
||||||
apt_packages = apt_packages + WOVariables.wo_redis
|
apt_packages = apt_packages + ["redis-server"]
|
||||||
|
|
||||||
if self.app.pargs.php73:
|
if self.app.pargs.php73:
|
||||||
Log.debug(self, "Setting apt_packages variable for PHP 7.3")
|
Log.debug(self, "Setting apt_packages variable for PHP 7.3")
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ class WOStackController(CementBaseController):
|
|||||||
empty_packages = []
|
empty_packages = []
|
||||||
wo_webroot = "/var/www/"
|
wo_webroot = "/var/www/"
|
||||||
pargs = self.app.pargs
|
pargs = self.app.pargs
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Default action for stack installation
|
# Default action for stack installation
|
||||||
if ((not pargs.web) and (not pargs.admin) and
|
if ((not pargs.web) and (not pargs.admin) and
|
||||||
@@ -190,7 +191,7 @@ class WOStackController(CementBaseController):
|
|||||||
if pargs.redis:
|
if pargs.redis:
|
||||||
pargs.php = True
|
pargs.php = True
|
||||||
if not WOAptGet.is_installed(self, 'redis-server'):
|
if not WOAptGet.is_installed(self, 'redis-server'):
|
||||||
apt_packages = apt_packages + WOVariables.wo_redis
|
apt_packages = apt_packages + ["redis-server"]
|
||||||
|
|
||||||
else:
|
else:
|
||||||
Log.info(self, "Redis already installed")
|
Log.info(self, "Redis already installed")
|
||||||
@@ -224,10 +225,31 @@ class WOStackController(CementBaseController):
|
|||||||
|
|
||||||
# MariaDB 10.3
|
# MariaDB 10.3
|
||||||
if pargs.mysql:
|
if pargs.mysql:
|
||||||
|
if not WOVariables.wo_distro == 'raspbian':
|
||||||
|
if (not WOVariables.wo_platform_codename == 'jessie'):
|
||||||
|
if ((not WOFileUtils.grep(
|
||||||
|
self, "/etc/apt/sources.list.d/wo-repo.list",
|
||||||
|
"10.1")) and
|
||||||
|
(not WOFileUtils.grep(
|
||||||
|
self, "/etc/apt/sources.list.d/wo-repo.list",
|
||||||
|
"10.1"))):
|
||||||
|
|
||||||
|
wo_mysql = ["mariadb-server", "percona-toolkit",
|
||||||
|
"python3-mysqldb", "mariadb-backup"]
|
||||||
|
else:
|
||||||
|
wo_mysql = ["mariadb-server", "percona-toolkit",
|
||||||
|
"python3-mysqldb"]
|
||||||
|
else:
|
||||||
|
wo_mysql = ["mariadb-server", "percona-toolkit",
|
||||||
|
"python3-mysql.connector"]
|
||||||
|
else:
|
||||||
|
wo_mysql = ["mariadb-server", "percona-toolkit",
|
||||||
|
"python3-mysqldb"]
|
||||||
|
|
||||||
pargs.mysqltuner = 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 + wo_mysql
|
||||||
else:
|
else:
|
||||||
Log.debug(self, "MySQL already installed and alive")
|
Log.debug(self, "MySQL already installed and alive")
|
||||||
Log.info(self, "MySQL already installed and alive")
|
Log.info(self, "MySQL already installed and alive")
|
||||||
@@ -585,7 +607,7 @@ class WOStackController(CementBaseController):
|
|||||||
# REDIS
|
# REDIS
|
||||||
if pargs.redis:
|
if pargs.redis:
|
||||||
Log.debug(self, "Remove apt_packages variable of Redis")
|
Log.debug(self, "Remove apt_packages variable of Redis")
|
||||||
apt_packages = apt_packages + WOVariables.wo_redis
|
apt_packages = apt_packages + ["redis-server"]
|
||||||
|
|
||||||
# MariaDB
|
# MariaDB
|
||||||
if pargs.mysql:
|
if pargs.mysql:
|
||||||
@@ -804,7 +826,7 @@ class WOStackController(CementBaseController):
|
|||||||
# REDIS
|
# REDIS
|
||||||
if pargs.redis:
|
if pargs.redis:
|
||||||
Log.debug(self, "Remove apt_packages variable of Redis")
|
Log.debug(self, "Remove apt_packages variable of Redis")
|
||||||
apt_packages = apt_packages + WOVariables.wo_redis
|
apt_packages = apt_packages + ["redis-server"]
|
||||||
|
|
||||||
# MariaDB
|
# MariaDB
|
||||||
if pargs.mysql:
|
if pargs.mysql:
|
||||||
|
|||||||
@@ -29,8 +29,9 @@ from wo.core.variables import WOVariables
|
|||||||
def pre_pref(self, apt_packages):
|
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(["mariadb-server"]).issubset(set(apt_packages)) or
|
||||||
set(WOVariables.wo_mysql_client).issubset(set(apt_packages))):
|
set(["mariadb-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...")
|
||||||
@@ -47,7 +48,7 @@ def pre_pref(self, apt_packages):
|
|||||||
keyserver="keyserver.ubuntu.com")
|
keyserver="keyserver.ubuntu.com")
|
||||||
WORepo.add_key(self, '0xF1656F24C74CD1D8',
|
WORepo.add_key(self, '0xF1656F24C74CD1D8',
|
||||||
keyserver="keyserver.ubuntu.com")
|
keyserver="keyserver.ubuntu.com")
|
||||||
if set(WOVariables.wo_mysql).issubset(set(apt_packages)):
|
if set(["mariadb-server"]).issubset(set(apt_packages)):
|
||||||
# generate random 24 characters root password
|
# generate random 24 characters root password
|
||||||
chars = ''.join(random.sample(string.ascii_letters, 24))
|
chars = ''.join(random.sample(string.ascii_letters, 24))
|
||||||
|
|
||||||
@@ -139,7 +140,7 @@ def pre_pref(self, apt_packages):
|
|||||||
Log.debug(self, 'Adding deb.sury GPG key')
|
Log.debug(self, 'Adding deb.sury GPG key')
|
||||||
WORepo.add_key(self, WOVariables.wo_php_key)
|
WORepo.add_key(self, WOVariables.wo_php_key)
|
||||||
# add redis repository
|
# add redis repository
|
||||||
if set(WOVariables.wo_redis).issubset(set(apt_packages)):
|
if set(['redis-server']).issubset(set(apt_packages)):
|
||||||
Log.info(self, "Adding repository for Redis, please wait...")
|
Log.info(self, "Adding repository for Redis, please wait...")
|
||||||
if WOVariables.wo_distro == 'ubuntu':
|
if WOVariables.wo_distro == 'ubuntu':
|
||||||
Log.debug(self, 'Adding ppa for redis')
|
Log.debug(self, 'Adding ppa for redis')
|
||||||
@@ -189,7 +190,7 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
|||||||
'\t$request_filename;\n')
|
'\t$request_filename;\n')
|
||||||
try:
|
try:
|
||||||
data = dict(php="9000", debug="9001",
|
data = dict(php="9000", debug="9001",
|
||||||
php7="9070", debug7="9170")
|
php7="9070", debug7="9170")
|
||||||
WOTemplate.render(
|
WOTemplate.render(
|
||||||
self, '{0}/upstream.conf'.format(ngxcnf),
|
self, '{0}/upstream.conf'.format(ngxcnf),
|
||||||
'upstream.mustache', data, overwrite=True)
|
'upstream.mustache', data, overwrite=True)
|
||||||
@@ -1106,7 +1107,7 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
|||||||
WOService.reload_service(self, 'proftpd')
|
WOService.reload_service(self, 'proftpd')
|
||||||
|
|
||||||
# Redis configuration
|
# Redis configuration
|
||||||
if set(WOVariables.wo_redis).issubset(set(apt_packages)):
|
if set(['redus-server']).issubset(set(apt_packages)):
|
||||||
if os.path.isfile("/etc/nginx/conf.d/upstream.conf"):
|
if os.path.isfile("/etc/nginx/conf.d/upstream.conf"):
|
||||||
if not WOFileUtils.grep(self, "/etc/nginx/conf.d/"
|
if not WOFileUtils.grep(self, "/etc/nginx/conf.d/"
|
||||||
"upstream.conf",
|
"upstream.conf",
|
||||||
|
|||||||
@@ -119,13 +119,13 @@ class WOStackUpgradeController(CementBaseController):
|
|||||||
|
|
||||||
if pargs.mysql:
|
if pargs.mysql:
|
||||||
if WOAptGet.is_installed(self, 'mariadb-server'):
|
if WOAptGet.is_installed(self, 'mariadb-server'):
|
||||||
apt_packages = apt_packages + WOVariables.wo_mysql
|
apt_packages = apt_packages + ['mariadb-server']
|
||||||
else:
|
else:
|
||||||
Log.info(self, "MariaDB is not installed")
|
Log.info(self, "MariaDB is not installed")
|
||||||
|
|
||||||
if pargs.redis:
|
if pargs.redis:
|
||||||
if WOAptGet.is_installed(self, 'redis-server'):
|
if WOAptGet.is_installed(self, 'redis-server'):
|
||||||
apt_packages = apt_packages + WOVariables.wo_redis
|
apt_packages = apt_packages + ['redis-server']
|
||||||
else:
|
else:
|
||||||
Log.info(self, "Redis is not installed")
|
Log.info(self, "Redis is not installed")
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ class WOVariables():
|
|||||||
"""Intialization of core variables"""
|
"""Intialization of core variables"""
|
||||||
|
|
||||||
# WordOps version
|
# WordOps version
|
||||||
wo_version = "3.9.8.9"
|
wo_version = "3.9.8.10"
|
||||||
# WordOps packages versions
|
# WordOps packages versions
|
||||||
wo_wp_cli = "2.2.0"
|
wo_wp_cli = "2.2.0"
|
||||||
wo_adminer = "4.7.2"
|
wo_adminer = "4.7.2"
|
||||||
@@ -144,21 +144,13 @@ class WOVariables():
|
|||||||
"10.3/debian {codename} main"
|
"10.3/debian {codename} main"
|
||||||
.format(codename=wo_platform_codename))
|
.format(codename=wo_platform_codename))
|
||||||
|
|
||||||
if wo_distro == 'raspbian':
|
|
||||||
wo_mysql = ["mariadb-server", "percona-toolkit",
|
|
||||||
"python3-mysqldb"]
|
|
||||||
elif wo_platform_codename == 'jessie':
|
|
||||||
wo_mysql = ["mariadb-server", "percona-toolkit",
|
|
||||||
"python3-mysql.connector"]
|
|
||||||
else:
|
|
||||||
wo_mysql = ["mariadb-server", "percona-toolkit",
|
|
||||||
"python3-mysqldb", "mariadb-backup"]
|
|
||||||
|
|
||||||
if wo_platform_codename == 'jessie':
|
if wo_platform_codename == 'jessie':
|
||||||
wo_mysql_client = ["mariadb-client", "python3-mysqldb"]
|
wo_mysql_client = ["mariadb-client", "python3-mysqldb"]
|
||||||
else:
|
else:
|
||||||
wo_mysql_client = ["mariadb-client", "python3-mysql.connector"]
|
wo_mysql_client = ["mariadb-client", "python3-mysql.connector"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wo_fail2ban = ["fail2ban"]
|
wo_fail2ban = ["fail2ban"]
|
||||||
wo_clamav = ["clamav", "clamav-freshclam"]
|
wo_clamav = ["clamav", "clamav-freshclam"]
|
||||||
|
|
||||||
@@ -170,7 +162,7 @@ class WOVariables():
|
|||||||
wo_redis_repo = ("deb https://packages.sury.org/php/ {codename} all"
|
wo_redis_repo = ("deb https://packages.sury.org/php/ {codename} all"
|
||||||
.format(codename=wo_platform_codename))
|
.format(codename=wo_platform_codename))
|
||||||
|
|
||||||
wo_redis = ['redis-server', 'php-redis']
|
wo_redis = ['redis-server']
|
||||||
|
|
||||||
# Repo path
|
# Repo path
|
||||||
wo_repo_file = "wo-repo.list"
|
wo_repo_file = "wo-repo.list"
|
||||||
|
|||||||
Reference in New Issue
Block a user