Cleanup site
This commit is contained in:
@@ -13,7 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
- New Nginx package on Ubuntu with Cloudflare HTTP/2 HPACK and Dynamic TLS records
|
- New Nginx package on Ubuntu with Cloudflare HTTP/2 HPACK and Dynamic TLS records
|
||||||
- phpMyAdmin upgrade with `wo stack upgrade --phpmyadmin`
|
- phpMyAdmin upgrade with `wo stack upgrade --phpmyadmin`
|
||||||
- Wildcard SSL Certificates support with DNS validation
|
- Wildcard SSL Certificates support with DNS validation
|
||||||
- Acme challenge validation with DNS API (Cloudflare, DigitalOcean, etc ..) on domain, subdomain, and wildcard
|
- Let's Encrypt DNS API support (Cloudflare, DigitalOcean, etc ..) on domain, subdomain, and wildcard
|
||||||
- Flag `--letsencrypt=clean` to purge a previous SSL configuration
|
- Flag `--letsencrypt=clean` to purge a previous SSL configuration
|
||||||
- Support for Debian 10 buster (testing - not ready for production)
|
- Support for Debian 10 buster (testing - not ready for production)
|
||||||
- Fail2ban with custom jails to secure WordPress & SSH
|
- Fail2ban with custom jails to secure WordPress & SSH
|
||||||
|
|||||||
@@ -833,9 +833,6 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
const='on', nargs='?')),
|
const='on', nargs='?')),
|
||||||
(['--proxy'],
|
(['--proxy'],
|
||||||
dict(help="update to proxy site", nargs='+')),
|
dict(help="update to proxy site", nargs='+')),
|
||||||
(['--experimental'],
|
|
||||||
dict(help="Enable Experimenal packages without prompt",
|
|
||||||
action='store_true')),
|
|
||||||
(['--all'],
|
(['--all'],
|
||||||
dict(help="update all sites", action='store_true')),
|
dict(help="update all sites", action='store_true')),
|
||||||
(['--force'],
|
(['--force'],
|
||||||
@@ -858,7 +855,7 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
pargs.mysql or pargs.wp or pargs.wpsubdir or
|
pargs.mysql or pargs.wp or pargs.wpsubdir or
|
||||||
pargs.wpsubdomain or pargs.wpfc or pargs.wpsc or
|
pargs.wpsubdomain or pargs.wpfc or pargs.wpsc or
|
||||||
pargs.wpredis or pargs.letsencrypt or pargs.hsts or
|
pargs.wpredis or pargs.letsencrypt or pargs.hsts or
|
||||||
pargs.dns):
|
pargs.dns or pargs.force):
|
||||||
Log.error(self, "Please provide options to update sites.")
|
Log.error(self, "Please provide options to update sites.")
|
||||||
|
|
||||||
if pargs.all:
|
if pargs.all:
|
||||||
@@ -970,7 +967,7 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
(stype == 'wpsubdir' and oldsitetype in ['wpsubdomain']) or
|
(stype == 'wpsubdir' and oldsitetype in ['wpsubdomain']) or
|
||||||
(stype == 'wpsubdomain' and oldsitetype in ['wpsubdir']) or
|
(stype == 'wpsubdomain' and oldsitetype in ['wpsubdir']) or
|
||||||
(stype == oldsitetype and cache == oldcachetype) and not
|
(stype == oldsitetype and cache == oldcachetype) and not
|
||||||
(pargs.php73 or pargs.hsts or pargs.letsencrypt)):
|
pargs.php73):
|
||||||
Log.info(self, Log.FAIL + "can not update {0} {1} to {2} {3}".
|
Log.info(self, Log.FAIL + "can not update {0} {1} to {2} {3}".
|
||||||
format(oldsitetype, oldcachetype, stype, cache))
|
format(oldsitetype, oldcachetype, stype, cache))
|
||||||
return 1
|
return 1
|
||||||
@@ -1211,12 +1208,15 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
if pargs.php73 == "on":
|
if pargs.php73 == "on":
|
||||||
data['php73'] = True
|
data['php73'] = True
|
||||||
php73 = True
|
php73 = True
|
||||||
|
else:
|
||||||
|
data['php73'] = False
|
||||||
|
php73 = False
|
||||||
|
|
||||||
if pargs.letsencrypt == "on":
|
if pargs.letsencrypt == "on":
|
||||||
if oldsitetype in ['wpsubdomain']:
|
if oldsitetype in ['wpsubdomain']:
|
||||||
data['letsencrypt'] = True
|
data['letsencrypt'] = True
|
||||||
letsencrypt = True
|
letsencrypt = True
|
||||||
wildcard = True
|
pargs.letsencrypt == 'wildcard'
|
||||||
else:
|
else:
|
||||||
data['letsencrypt'] = True
|
data['letsencrypt'] = True
|
||||||
letsencrypt = True
|
letsencrypt = True
|
||||||
@@ -1449,7 +1449,8 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
# Setup WordPress if old sites are html/php/mysql sites
|
# Setup WordPress if old sites are html/php/mysql sites
|
||||||
if data['wp'] and oldsitetype in ['html', 'proxy', 'php', 'mysql']:
|
if data['wp'] and oldsitetype in ['html', 'proxy', 'php',
|
||||||
|
'mysql', 'php73']:
|
||||||
try:
|
try:
|
||||||
wo_wp_creds = setupwordpress(self, data)
|
wo_wp_creds = setupwordpress(self, data)
|
||||||
except SiteError as e:
|
except SiteError as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user