diff --git a/config/bash_completion.d/wo_auto.rc b/config/bash_completion.d/wo_auto.rc index 082d0d1..d24738e 100644 --- a/config/bash_completion.d/wo_auto.rc +++ b/config/bash_completion.d/wo_auto.rc @@ -159,13 +159,13 @@ _wo_complete() "create") COMPREPLY=( $(compgen \ - -W "--user --pass --email --html --php --php72 --php73 --php74 --php80 --php81 --php82 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --proxy= --wpredis --wprocket --wpce -le --letsencrypt --letsencrypt=wildcard -le=wildcard --dns --dns=dns_cf --dns=dns_dgon" \ + -W "--user --pass --email --html --php --php72 --php73 --php74 --php80 --php81 --php82 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --proxy= --alias --wpredis --wprocket --wpce -le --letsencrypt --letsencrypt=wildcard -le=wildcard --dns --dns=dns_cf --dns=dns_dgon" \ -- $cur) ) ;; "update") COMPREPLY=( $(compgen \ - -W "--password --php --php72 --php73 --php74 --php80 --php81 --php82 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --wpce -le -le=off --letsencrypt --letsencrypt=off --letsencrypt=clean -le=wildcard -le=clean --dns --dns=dns_cf --dns=dns_dgon --ngxblocker --ngxblocker=off" \ + -W "--password --php --php72 --php73 --php74 --php80 --php81 --php82 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --wpce --alias -le -le=off --letsencrypt --letsencrypt=off --letsencrypt=clean -le=wildcard -le=clean --dns --dns=dns_cf --dns=dns_dgon --ngxblocker --ngxblocker=off" \ -- $cur) ) ;; "delete") diff --git a/setup.py b/setup.py index 1b64bd4..4afb1f7 100644 --- a/setup.py +++ b/setup.py @@ -64,7 +64,7 @@ setup(name='wordops', 'cement == 2.10.12', 'pystache', 'pynginxconfig', - 'PyMySQL == 1.1.0', + 'PyMySQL >= 1.0.2', 'psutil', 'sh', 'SQLAlchemy == 1.4.49', diff --git a/wo/cli/plugins/site_update.py b/wo/cli/plugins/site_update.py index a9df73a..7f4826b 100644 --- a/wo/cli/plugins/site_update.py +++ b/wo/cli/plugins/site_update.py @@ -386,15 +386,20 @@ class WOSiteUpdateController(CementBaseController): for pargs_version, version in WOVar.wo_php_versions.items(): old_version_var = bool(check_php_version == version) + Log.debug(self, f"old_version_var for {version} = {old_version_var}") if getattr(pargs, pargs_version): if globals()[pargs_version] is old_version_var: - Log.info(self, f"PHP {version} is already enabled for given site") + Log.info( + self, f"PHP {version} is already enabled for given site") setattr(pargs, pargs_version, False) - if (data and not getattr(pargs, pargs_version)): + if (data and (not pargs.php73) and + (not pargs.php74) and (not pargs.php72) and + (not pargs.php80) and (not pargs.php81) and (not pargs.php82)): data[pargs_version] = bool(old_version_var is True) - Log.debug(self, f"data {pargs_version} = {data[pargs_version]}") + Log.debug( + self, f"data {pargs_version} = {data[pargs_version]}") globals()[pargs_version] = bool(old_version_var is True) if pargs.letsencrypt: @@ -485,7 +490,9 @@ class WOSiteUpdateController(CementBaseController): for pargs_version, version in WOVar.wo_php_versions.items(): if globals()[pargs_version] is True: data['wo_php'] = pargs_version + Log.debug(self, f"data wo_php set to {pargs_version}") check_php_version = version + Log.debug(self, f"check_php_versions et to {version}") break if pargs.hsts: @@ -792,7 +799,7 @@ class WOSiteUpdateController(CementBaseController): # Setup WordPress if old sites are html/php/mysql sites if data['wp'] and oldsitetype in ['html', 'proxy', 'php', 'php72', 'mysql', 'php73', 'php74', 'php80', - 'php81', ]: + 'php81', 'php82']: try: wo_wp_creds = setupwordpress(self, data) except SiteError as e: