Fix mysql stack purge with remote db
This commit is contained in:
@@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
|
|
||||||
- Domain IP validation when using CNAME before issuing SSL certificate
|
- Domain IP validation when using CNAME before issuing SSL certificate
|
||||||
- Netdata stack purge/remove not working properly
|
- Netdata stack purge/remove not working properly
|
||||||
|
- Do not backup all databases when purging `--mysql` stack with remote MySQL server
|
||||||
|
|
||||||
### v3.11.2 - 2019-12-07
|
### v3.11.2 - 2019-12-07
|
||||||
|
|
||||||
|
|||||||
1
install
1
install
@@ -430,6 +430,7 @@ wo_install() {
|
|||||||
local python_ver
|
local python_ver
|
||||||
python_ver=$(python3 -c "import sys; print(sys.version_info[1])")
|
python_ver=$(python3 -c "import sys; print(sys.version_info[1])")
|
||||||
cd /usr/local/lib/python3."$python_ver"/dist-packages || exit 1
|
cd /usr/local/lib/python3."$python_ver"/dist-packages || exit 1
|
||||||
|
rm -f /usr/local/bin/wo
|
||||||
if [ "$wo_branch" = "master" ]; then
|
if [ "$wo_branch" = "master" ]; then
|
||||||
python3 -m pip uninstall wo -y
|
python3 -m pip uninstall wo -y
|
||||||
python3 -m pip install --upgrade wordops
|
python3 -m pip install --upgrade wordops
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -27,7 +27,7 @@ if os.geteuid() == 0:
|
|||||||
os.makedirs('/var/lib/wo/tmp/')
|
os.makedirs('/var/lib/wo/tmp/')
|
||||||
|
|
||||||
setup(name='wordops',
|
setup(name='wordops',
|
||||||
version='3.11.2',
|
version='3.11.3',
|
||||||
description='An essential toolset that eases server administration',
|
description='An essential toolset that eases server administration',
|
||||||
long_description=LONG,
|
long_description=LONG,
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
|
|||||||
@@ -1130,10 +1130,14 @@ class WOStackController(CementBaseController):
|
|||||||
WOService.stop_service(self, 'fail2ban')
|
WOService.stop_service(self, 'fail2ban')
|
||||||
|
|
||||||
if (set(["mariadb-server"]).issubset(set(apt_packages))):
|
if (set(["mariadb-server"]).issubset(set(apt_packages))):
|
||||||
if (os.path.isfile('/usr/bin/mysql') and
|
if self.app.config.has_section('stack'):
|
||||||
os.path.isdir('/var/lib/mysql')):
|
database_host = self.app.config.get(
|
||||||
|
'stack', 'ip-address')
|
||||||
|
else:
|
||||||
|
database_host = 'na'
|
||||||
|
if database_host == '127.0.0.1':
|
||||||
WOMysql.backupAll(self)
|
WOMysql.backupAll(self)
|
||||||
WOService.stop_service(self, 'mysql')
|
WOService.stop_service(self, 'mysql')
|
||||||
|
|
||||||
# Netdata uninstaller
|
# Netdata uninstaller
|
||||||
if '/var/lib/wo/tmp/kickstart.sh' in packages:
|
if '/var/lib/wo/tmp/kickstart.sh' in packages:
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ location /wp-content/uploads {
|
|||||||
try_files $uri$webp_suffix $uri =404;
|
try_files $uri$webp_suffix $uri =404;
|
||||||
}
|
}
|
||||||
location ~* \.(php|gz|log|zip|tar|rar|xz)$ {
|
location ~* \.(php|gz|log|zip|tar|rar|xz)$ {
|
||||||
#Prevent Direct Access Of PHP Files & BackupsFrom Web Browsers
|
#Prevent Direct Access Of PHP Files & Backups from Web Browsers
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,6 +95,6 @@ location ~ \/wp-admin\/load-(scripts|styles).php {
|
|||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
# Protect Easy Digital Download files from being accessed directly.
|
# Protect Easy Digital Download files from being accessed directly.
|
||||||
location ~ ^/wp-content/uploads/edd/(.*?)\.zip$ {
|
location ~ ^/wp-content/uploads/edd/(.*?)\.zip$ {
|
||||||
rewrite / permanent;
|
rewrite / permanent;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user