Remove php72 and php73

This commit is contained in:
VirtuBox
2024-05-29 02:00:50 +02:00
parent e2f8951940
commit def2ddd393
9 changed files with 39 additions and 170 deletions

View File

@@ -32,7 +32,7 @@ echo -e "${CGREEN}#############################################${CEND}"
echo -e ' stack install ' echo -e ' stack install '
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
stack_list='nginx php php73 php74 php80 php81 php82 php83 mysql redis fail2ban clamav proftpd netdata phpmyadmin composer dashboard extplorer redis phpredisadmin mysqltuner utils ufw cheat nanorc' stack_list='nginx php php74 php80 php81 php82 php83 mysql redis fail2ban clamav proftpd netdata phpmyadmin composer dashboard extplorer redis phpredisadmin mysqltuner utils ufw cheat nanorc'
for stack in $stack_list; do for stack in $stack_list; do
echo -ne " Installing $stack [..]\r" echo -ne " Installing $stack [..]\r"
@@ -52,7 +52,7 @@ done
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
echo -e ' Simple site create ' echo -e ' Simple site create '
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
site_types='html php php72 php73 php74 php80 php81 php82 php83 mysql wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir ngxblocker' site_types='html php php74 php80 php81 php82 php83 mysql wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir ngxblocker'
for site in $site_types; do for site in $site_types; do
echo -ne " Creating $site [..]\r" echo -ne " Creating $site [..]\r"
if { if {
@@ -107,7 +107,7 @@ echo
wo site info php.net wo site info php.net
echo echo
echo echo
wo site info php72.net wo site info php74.net
echo echo
echo echo
wo site list wo site list
@@ -116,7 +116,7 @@ echo
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
echo -e ' wo site update --php74 ' echo -e ' wo site update --php74 '
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
other_site_types='mysql php72 php73 php83 wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir' other_site_types='mysql php81 php82 php83 wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir'
for site in $other_site_types; do for site in $other_site_types; do
echo -ne " Updating site to $site php74 [..]\r" echo -ne " Updating site to $site php74 [..]\r"
if { if {
@@ -137,55 +137,17 @@ echo
wo site info wp.net wo site info wp.net
echo echo
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
echo -e ' wo site update --php73 '
echo -e "${CGREEN}#############################################${CEND}"
other_site_types='html mysql wp php72 php73 wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir'
for site in $other_site_types; do
echo -ne " Updating site to $site php73 [..]\r"
if {
wo site update ${site}.net --php73
} >>/var/log/wo/test.log; then
echo -ne " Updating site to $site php73 [${CGREEN}OK${CEND}]\\r"
echo -ne '\n'
else
echo -e " Updating site to $site php73 [${CRED}FAIL${CEND}]"
echo -ne '\n'
exit_script
fi
done
echo
echo -e "${CGREEN}#############################################${CEND}"
echo echo
wo site info wp.net wo site info wp.net
echo echo
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
echo -e ' wo site update --php72 '
echo -e "${CGREEN}#############################################${CEND}"
other_site_types='mysql php72 php73 wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir'
for site in $other_site_types; do
echo -ne " Updating site to $site php72 [..]\r"
if {
wo site update ${site}.net --php72
} >>/var/log/wo/test.log; then
echo -ne " Updating site to $site php72 [${CGREEN}OK${CEND}]\\r"
echo -ne '\n'
else
echo -e " Updating site to $site php72 [${CRED}FAIL${CEND}]"
echo -ne '\n'
exit_script
fi
done
echo
echo -e "${CGREEN}#############################################${CEND}"
echo echo
wo site info wp.net wo site info wp.net
echo echo
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
echo -e ' wo site update --php80 ' echo -e ' wo site update --php80 '
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
other_site_types='mysql php72 php73 wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir' other_site_types='mysql php81 php82 wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir'
for site in $other_site_types; do for site in $other_site_types; do
echo -ne " Updating site to $site php80 [..]\r" echo -ne " Updating site to $site php80 [..]\r"
if { if {
@@ -208,7 +170,7 @@ echo
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
echo -e ' wo site update --php81 ' echo -e ' wo site update --php81 '
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
other_site_types='mysql php72 php73 wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir' other_site_types='mysql php82 wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir'
for site in $other_site_types; do for site in $other_site_types; do
echo -ne " Updating site to $site php81 [..]\r" echo -ne " Updating site to $site php81 [..]\r"
if { if {
@@ -229,7 +191,7 @@ echo
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
echo -e ' wo site update --php82 ' echo -e ' wo site update --php82 '
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
other_site_types='mysql php72 php73 wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir' other_site_types='mysql wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir'
for site in $other_site_types; do for site in $other_site_types; do
echo -ne " Updating site to $site php82 [..]\r" echo -ne " Updating site to $site php82 [..]\r"
if { if {
@@ -313,7 +275,7 @@ if [ -z "$1" ]; then
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
echo -e ' wo stack upgrade ' echo -e ' wo stack upgrade '
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
stack_upgrade='nginx php php72 php73 php74 php80 php81 php82 mysql redis netdata dashboard phpmyadmin adminer fail2ban composer ngxblocker mysqltuner' stack_upgrade='nginx php php74 php80 php81 php82 mysql redis netdata dashboard phpmyadmin adminer fail2ban composer ngxblocker mysqltuner'
for stack in $stack_upgrade; do for stack in $stack_upgrade; do
echo -ne " Upgrading $stack [..]\r" echo -ne " Upgrading $stack [..]\r"
if { if {
@@ -460,7 +422,7 @@ wo info
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
echo -e ' wo stack purge ' echo -e ' wo stack purge '
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
stack_purge='nginx php php73 php74 php80 php81 php82 php83 mysql redis fail2ban clamav proftpd netdata phpmyadmin composer dashboard extplorer adminer redis ufw ngxblocker cheat nanorc' stack_purge='nginx php php74 php80 php81 php82 php83 mysql redis fail2ban clamav proftpd netdata phpmyadmin composer dashboard extplorer adminer redis ufw ngxblocker cheat nanorc'
for stack in $stack_purge; do for stack in $stack_purge; do
echo -ne " purging $stack [..]\r" echo -ne " purging $stack [..]\r"
if { if {

View File

@@ -89,7 +89,7 @@ class WOCleanController(CementBaseController):
Log.debug(self, "{0}".format(e)) Log.debug(self, "{0}".format(e))
Log.debug(self, "Unable hit url, " Log.debug(self, "Unable hit url, "
" http://127.0.0.1/cache/opcache/" " http://127.0.0.1/cache/opcache/"
"php72.php," "phpXX.php,"
" please check you have admin tools installed") " please check you have admin tools installed")
Log.debug(self, "please check you have admin tools installed," Log.debug(self, "please check you have admin tools installed,"
" or install them with `wo stack install --admin`") " or install them with `wo stack install --admin`")

View File

@@ -66,7 +66,7 @@ class WOSiteCreateController(CementBaseController):
action='store', nargs='?')), action='store', nargs='?')),
(['--subsiteof'], (['--subsiteof'],
dict(help="create a subsite of a multisite install", dict(help="create a subsite of a multisite install",
action='store', nargs='?')), action='store', nargs='?')),
(['-le', '--letsencrypt'], (['-le', '--letsencrypt'],
dict(help="configure letsencrypt ssl for the site", dict(help="configure letsencrypt ssl for the site",
action='store' or 'store_const', action='store' or 'store_const',
@@ -219,14 +219,13 @@ class WOSiteCreateController(CementBaseController):
data["wpce"] = parent_site_info.cache_type == 'wpce' data["wpce"] = parent_site_info.cache_type == 'wpce'
data["wpredis"] = parent_site_info.cache_type == 'wpredis' data["wpredis"] = parent_site_info.cache_type == 'wpredis'
data["wpsubdir"] = parent_site_info.site_type == 'wpsubdir' data["wpsubdir"] = parent_site_info.site_type == 'wpsubdir'
data["wo_php"] = ("php" + parent_site_info.php_version).replace(".", "") data["wo_php"] = ("php" + parent_site_info.php_version).replace(".", "")
data['subsite'] = True data['subsite'] = True
data['subsiteof_name'] = subsiteof_name data['subsiteof_name'] = subsiteof_name
data['subsiteof_webroot'] = parent_site_info.site_path data['subsiteof_webroot'] = parent_site_info.site_path
if (pargs.php74 or pargs.php80 or pargs.php81 or
if (pargs.php72 or pargs.php73 or pargs.php74 or pargs.php82 or pargs.php83):
pargs.php80 or pargs.php81 or pargs.php82 or pargs.php83):
data = dict( data = dict(
site_name=wo_domain, www_domain=wo_www_domain, site_name=wo_domain, www_domain=wo_www_domain,
static=False, basic=False, static=False, basic=False,
@@ -296,7 +295,7 @@ class WOSiteCreateController(CementBaseController):
(not pargs.wprocket) and (not pargs.wprocket) and
(not pargs.wpce) and (not pargs.wpce) and
(not pargs.wpredis) and (not pargs.wpredis) and
(not pargs.subsiteof)): (not pargs.subsiteof)):
data['basic'] = True data['basic'] = True
if (cache == 'wpredis'): if (cache == 'wpredis'):

View File

@@ -835,8 +835,8 @@ def site_package_check(self, stype):
stack = WOStackController() stack = WOStackController()
stack.app = self.app stack.app = self.app
pargs = self.app.pargs pargs = self.app.pargs
if stype in ['html', 'proxy', 'php', 'php72', 'mysql', 'wp', 'wpsubdir', if stype in ['html', 'proxy', 'php', 'mysql', 'wp', 'wpsubdir',
'wpsubdomain', 'php73', 'php74', 'php80', 'php81', 'php82', 'php83', 'alias', 'subsite']: 'wpsubdomain', 'php74', 'php80', 'php81', 'php82', 'php83', 'alias', 'subsite']:
Log.debug(self, "Setting apt_packages variable for Nginx") Log.debug(self, "Setting apt_packages variable for Nginx")
# Check if server has nginx-custom package # Check if server has nginx-custom package
@@ -872,15 +872,15 @@ def site_package_check(self, stype):
wo_nginx.write('fastcgi_param \tSCRIPT_FILENAME ' wo_nginx.write('fastcgi_param \tSCRIPT_FILENAME '
'\t$request_filename;\n') '\t$request_filename;\n')
php_versions = ['php72', 'php73', 'php74', 'php80', 'php81', 'php82', 'php83'] php_versions = ['php74', 'php80', 'php81', 'php82', 'php83']
selected_versions = [version for version in php_versions if getattr(pargs, version)] selected_versions = [version for version in php_versions if getattr(pargs, version)]
if len(selected_versions) > 1: if len(selected_versions) > 1:
Log.error(self, "Error: two different PHP versions cannot be " Log.error(self, "Error: two different PHP versions cannot be "
"combined within the same WordOps site") "combined within the same WordOps site")
if ((not pargs.php72) and (not pargs.php73) and (not pargs.php74) and if ((not pargs.php74) and (not pargs.php80) and
(not pargs.php80) and (not pargs.php81) and (not pargs.php82) and (not pargs.php81) and (not pargs.php82) and
(not pargs.php83) and (not pargs.php83) and
stype in ['php', 'mysql', 'wp', 'wpsubdir', stype in ['php', 'mysql', 'wp', 'wpsubdir',
'wpsubdomain']): 'wpsubdomain']):
@@ -1082,8 +1082,8 @@ def detSitePar(opts):
cachelist = list() cachelist = list()
for key, val in opts.items(): for key, val in opts.items():
if val and key in ['html', 'php', 'mysql', 'wp', if val and key in ['html', 'php', 'mysql', 'wp',
'wpsubdir', 'wpsubdomain', 'php72', 'wpsubdir', 'wpsubdomain',
'php73', 'php74', 'php80', 'php81', 'php82', 'php83']: 'php74', 'php80', 'php81', 'php82', 'php83']:
typelist.append(key) typelist.append(key)
elif val and key in ['wpfc', 'wpsc', 'wpredis', 'wprocket', 'wpce']: elif val and key in ['wpfc', 'wpsc', 'wpredis', 'wprocket', 'wpce']:
cachelist.append(key) cachelist.append(key)
@@ -1099,18 +1099,6 @@ def detSitePar(opts):
cachetype = 'basic' cachetype = 'basic'
else: else:
cachetype = cachelist[0] cachetype = cachelist[0]
elif False not in [x in ('php72', 'mysql', 'html') for x in typelist]:
sitetype = 'mysql'
if not cachelist:
cachetype = 'basic'
else:
cachetype = cachelist[0]
elif False not in [x in ('php73', 'mysql', 'html') for x in typelist]:
sitetype = 'mysql'
if not cachelist:
cachetype = 'basic'
else:
cachetype = cachelist[0]
elif False not in [x in ('php74', 'mysql', 'html') for x in typelist]: elif False not in [x in ('php74', 'mysql', 'html') for x in typelist]:
sitetype = 'mysql' sitetype = 'mysql'
if not cachelist: if not cachelist:
@@ -1147,18 +1135,6 @@ def detSitePar(opts):
cachetype = 'basic' cachetype = 'basic'
else: else:
cachetype = cachelist[0] cachetype = cachelist[0]
elif False not in [x in ('php72', 'mysql') for x in typelist]:
sitetype = 'mysql'
if not cachelist:
cachetype = 'basic'
else:
cachetype = cachelist[0]
elif False not in [x in ('php73', 'mysql') for x in typelist]:
sitetype = 'mysql'
if not cachelist:
cachetype = 'basic'
else:
cachetype = cachelist[0]
elif False not in [x in ('php74', 'mysql') for x in typelist]: elif False not in [x in ('php74', 'mysql') for x in typelist]:
sitetype = 'mysql' sitetype = 'mysql'
if not cachelist: if not cachelist:
@@ -1213,18 +1189,6 @@ def detSitePar(opts):
cachetype = 'basic' cachetype = 'basic'
else: else:
cachetype = cachelist[0] cachetype = cachelist[0]
elif False not in [x in ('wp', 'php72') for x in typelist]:
sitetype = 'wp'
if not cachelist:
cachetype = 'basic'
else:
cachetype = cachelist[0]
elif False not in [x in ('wp', 'php73') for x in typelist]:
sitetype = 'wp'
if not cachelist:
cachetype = 'basic'
else:
cachetype = cachelist[0]
elif False not in [x in ('wp', 'php74') for x in typelist]: elif False not in [x in ('wp', 'php74') for x in typelist]:
sitetype = 'wp' sitetype = 'wp'
if not cachelist: if not cachelist:
@@ -1255,18 +1219,6 @@ def detSitePar(opts):
cachetype = 'basic' cachetype = 'basic'
else: else:
cachetype = cachelist[0] cachetype = cachelist[0]
elif False not in [x in ('wpsubdir', 'php72') for x in typelist]:
sitetype = 'wpsubdir'
if not cachelist:
cachetype = 'basic'
else:
cachetype = cachelist[0]
elif False not in [x in ('wpsubdir', 'php73') for x in typelist]:
sitetype = 'wpsubdir'
if not cachelist:
cachetype = 'basic'
else:
cachetype = cachelist[0]
elif False not in [x in ('wpsubdir', 'php74') for x in typelist]: elif False not in [x in ('wpsubdir', 'php74') for x in typelist]:
sitetype = 'wpsubdir' sitetype = 'wpsubdir'
if not cachelist: if not cachelist:
@@ -1297,18 +1249,6 @@ def detSitePar(opts):
cachetype = 'basic' cachetype = 'basic'
else: else:
cachetype = cachelist[0] cachetype = cachelist[0]
elif False not in [x in ('wpsubdomain', 'php72') for x in typelist]:
sitetype = 'wpsubdomain'
if not cachelist:
cachetype = 'basic'
else:
cachetype = cachelist[0]
elif False not in [x in ('wpsubdomain', 'php73') for x in typelist]:
sitetype = 'wpsubdomain'
if not cachelist:
cachetype = 'basic'
else:
cachetype = cachelist[0]
elif False not in [x in ('wpsubdomain', 'php74') for x in typelist]: elif False not in [x in ('wpsubdomain', 'php74') for x in typelist]:
sitetype = 'wpsubdomain' sitetype = 'wpsubdomain'
if not cachelist: if not cachelist:
@@ -1345,12 +1285,6 @@ def detSitePar(opts):
if not typelist and not cachelist: if not typelist and not cachelist:
sitetype = None sitetype = None
cachetype = None cachetype = None
elif (not typelist or "php72" in typelist) and cachelist:
sitetype = 'wp'
cachetype = cachelist[0]
elif (not typelist or "php73" in typelist) and cachelist:
sitetype = 'wp'
cachetype = cachelist[0]
elif (not typelist or "php74" in typelist) and cachelist: elif (not typelist or "php74" in typelist) and cachelist:
sitetype = 'wp' sitetype = 'wp'
cachetype = cachelist[0] cachetype = cachelist[0]

View File

@@ -196,8 +196,8 @@ class WOSiteUpdateController(CementBaseController):
if ((pargs.password or pargs.hsts or if ((pargs.password or pargs.hsts or
pargs.ngxblocker or pargs.letsencrypt == 'renew') and not ( pargs.ngxblocker or pargs.letsencrypt == 'renew') and not (
pargs.html or pargs.php or pargs.php72 or pargs.php73 or pargs.html or pargs.php or pargs.php74 or pargs.php80 or
pargs.php74 or pargs.php80 or pargs.php81 or pargs.php82 or pargs.php81 or pargs.php82 or
pargs.php83 or pargs.mysql or pargs.wp or pargs.wpfc or pargs.wpsc or pargs.php83 or pargs.mysql or pargs.wp or pargs.wpfc or pargs.wpsc or
pargs.wprocket or pargs.wpce or pargs.wprocket or pargs.wpce or
pargs.wpsubdir or pargs.wpsubdomain)): pargs.wpsubdir or pargs.wpsubdomain)):
@@ -264,20 +264,18 @@ class WOSiteUpdateController(CementBaseController):
return 0 return 0
if (((stype == 'php' and if (((stype == 'php' and
oldsitetype not in ['html', 'proxy', 'php', 'php72', oldsitetype not in ['html', 'proxy', 'php', 'php74', 'php80',
'php73', 'php74', 'php80',
'php81', 'php82', 'php83']) or 'php81', 'php82', 'php83']) or
(stype == 'mysql' and oldsitetype not in [ (stype == 'mysql' and oldsitetype not in [
'html', 'php', 'php72', 'php73', 'php74', 'php80', 'php81', 'html', 'php', 'php74', 'php80', 'php81',
'php82', 'php83', 'proxy']) or 'php82', 'php83', 'proxy']) or
(stype == 'wp' and oldsitetype not in [ (stype == 'wp' and oldsitetype not in [
'html', 'php', 'php72', 'php73', 'php74', 'php80', 'php81', 'html', 'php', 'php74', 'php80', 'php81',
'php82', 'php83', 'mysql', 'proxy', 'wp']) or 'php82', 'php83', 'mysql', 'proxy', 'wp']) or
(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 (stype == oldsitetype and cache == oldcachetype)) and
not (pargs.php72 or pargs.php73 or not (pargs.php74 or pargs.php80 or
pargs.php74 or pargs.php80 or
pargs.php81 or pargs.php82 or pargs.php81 or pargs.php82 or
pargs.php83 or pargs.alias)): pargs.php83 or pargs.alias)):
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}".
@@ -336,8 +334,7 @@ class WOSiteUpdateController(CementBaseController):
data = dict( data = dict(
site_name=wo_domain, www_domain=wo_www_domain, site_name=wo_domain, www_domain=wo_www_domain,
static=False, basic=True, wp=False, wpfc=False, static=False, basic=True, wp=False, wpfc=False,
php72=False, php73=False, php74=False, php74=False, php80=False, php81=False, php82=False, php83=False,
php80=False, php81=False, php82=False, php83=False,
wpsc=False, wpredis=False, wprocket=False, wpce=False, wpsc=False, wpredis=False, wprocket=False, wpce=False,
multisite=False, wpsubdir=False, webroot=wo_site_webroot, multisite=False, wpsubdir=False, webroot=wo_site_webroot,
currsitetype=oldsitetype, currcachetype=oldcachetype) currsitetype=oldsitetype, currcachetype=oldcachetype)
@@ -361,11 +358,11 @@ class WOSiteUpdateController(CementBaseController):
if stype == 'wpsubdir': if stype == 'wpsubdir':
data['wpsubdir'] = True data['wpsubdir'] = True
if ((pargs.php72 or pargs.php73 or pargs.php74 or if ((pargs.php74 or pargs.php80 or pargs.php81 or
pargs.php80 or pargs.php81 or pargs.php82 or pargs.php83) and pargs.php82 or pargs.php83) and
(not data)): (not data)):
Log.debug( Log.debug(
self, "pargs php72, or php73, or php74, " self, "pargs php74, "
"or php80, or php81 or php82 or php83 enabled") "or php80, or php81 or php82 or php83 enabled")
data = dict( data = dict(
site_name=wo_domain, site_name=wo_domain,
@@ -433,8 +430,7 @@ class WOSiteUpdateController(CementBaseController):
self, f"PHP {version} is already enabled for given site") self, f"PHP {version} is already enabled for given site")
setattr(pargs, pargs_version, False) setattr(pargs, pargs_version, False)
if (data and (not pargs.php73) and if (data and (not pargs.php74) and
(not pargs.php74) and (not pargs.php72) and
(not pargs.php80) and (not pargs.php81) and (not pargs.php82) (not pargs.php80) and (not pargs.php81) and (not pargs.php82)
and (not pargs.php83)): and (not pargs.php83)):
data[pargs_version] = bool(old_version_var is True) data[pargs_version] = bool(old_version_var is True)

View File

@@ -183,8 +183,6 @@ class WOStackController(CementBaseController):
Log.debug(self, "Redis already installed") Log.debug(self, "Redis already installed")
wo_vars = { wo_vars = {
'php72': WOVar.wo_php72,
'php73': WOVar.wo_php73,
'php74': WOVar.wo_php74, 'php74': WOVar.wo_php74,
'php80': WOVar.wo_php80, 'php80': WOVar.wo_php80,
'php81': WOVar.wo_php81, 'php81': WOVar.wo_php81,
@@ -594,8 +592,6 @@ class WOStackController(CementBaseController):
# Create a dictionary that maps PHP versions to corresponding variables. # Create a dictionary that maps PHP versions to corresponding variables.
wo_vars = { wo_vars = {
'php72': WOVar.wo_php72,
'php73': WOVar.wo_php73,
'php74': WOVar.wo_php74, 'php74': WOVar.wo_php74,
'php80': WOVar.wo_php80, 'php80': WOVar.wo_php80,
'php81': WOVar.wo_php81, 'php81': WOVar.wo_php81,
@@ -855,8 +851,6 @@ class WOStackController(CementBaseController):
if pargs.all: if pargs.all:
pargs.web = True pargs.web = True
pargs.admin = True pargs.admin = True
pargs.php72 = True
pargs.php73 = True
pargs.php74 = True pargs.php74 = True
pargs.php80 = True pargs.php80 = True
pargs.php81 = True pargs.php81 = True
@@ -898,8 +892,6 @@ class WOStackController(CementBaseController):
Log.info(self, "Nginx is not installed") Log.info(self, "Nginx is not installed")
wo_vars = { wo_vars = {
'php72': WOVar.wo_php72,
'php73': WOVar.wo_php73,
'php74': WOVar.wo_php74, 'php74': WOVar.wo_php74,
'php80': WOVar.wo_php80, 'php80': WOVar.wo_php80,
'php81': WOVar.wo_php81, 'php81': WOVar.wo_php81,

View File

@@ -101,8 +101,6 @@ class WOStackUpgradeController(CementBaseController):
if pargs.web: if pargs.web:
pargs.nginx = True pargs.nginx = True
pargs.php72 = True
pargs.php73 = True
pargs.php74 = True pargs.php74 = True
pargs.php80 = True pargs.php80 = True
pargs.php81 = True pargs.php81 = True
@@ -136,8 +134,6 @@ class WOStackUpgradeController(CementBaseController):
Log.info(self, "Nginx Stable is not already installed") Log.info(self, "Nginx Stable is not already installed")
wo_vars = { wo_vars = {
'php72': WOVar.wo_php72,
'php73': WOVar.wo_php73,
'php74': WOVar.wo_php74, 'php74': WOVar.wo_php74,
'php80': WOVar.wo_php80, 'php80': WOVar.wo_php80,
'php81': WOVar.wo_php81, 'php81': WOVar.wo_php81,

View File

@@ -18,5 +18,5 @@ class WOExtract():
return True return True
except tarfile.TarError as e: except tarfile.TarError as e:
Log.debug(self, "{0}".format(e)) Log.debug(self, "{0}".format(e))
Log.error(self, 'Unable to extract file \{0}'.format(file)) Log.error(self, 'Unable to extract file {0}'.format(file))
return False return False

View File

@@ -124,23 +124,19 @@ class WOVar():
"/WordOps/xUbuntu_{0}/ /".format(wo_platform_version)) "/WordOps/xUbuntu_{0}/ /".format(wo_platform_version))
else: else:
if wo_distro == 'debian': if wo_distro == 'debian':
if wo_platform_codename == 'jessie': if wo_platform_codename == 'buster':
wo_deb_repo = "Debian_8.0"
elif wo_platform_codename == 'stretch':
wo_deb_repo = "Debian_9.0"
elif wo_platform_codename == 'buster':
wo_deb_repo = "Debian_10" wo_deb_repo = "Debian_10"
elif wo_platform_codename == 'bullseye': elif wo_platform_codename == 'bullseye':
wo_deb_repo = "Debian_11" wo_deb_repo = "Debian_11"
elif wo_platform_codename == 'bookworm': elif wo_platform_codename == 'bookworm':
wo_deb_repo = "Debian_12" wo_deb_repo = "Debian_12"
elif wo_distro == 'raspbian': elif wo_distro == 'raspbian':
if wo_platform_codename == 'stretch': if wo_platform_codename == 'buster':
wo_deb_repo = "Raspbian_9.0"
elif wo_platform_codename == 'buster':
wo_deb_repo = "Raspbian_10" wo_deb_repo = "Raspbian_10"
elif wo_platform_codename == 'bullseye': elif wo_platform_codename == 'bullseye':
wo_deb_repo = "Raspbian_11" wo_deb_repo = "Raspbian_11"
elif wo_platform_codename == 'bookworm':
wo_deb_repo = "Raspbian_12"
# debian/raspbian nginx repository # debian/raspbian nginx repository
wo_nginx_repo = ("deb http://download.opensuse.org" wo_nginx_repo = ("deb http://download.opensuse.org"
"/repositories/home:" "/repositories/home:"
@@ -151,8 +147,6 @@ class WOVar():
wo_nginx_key = 'FB898660' wo_nginx_key = 'FB898660'
wo_php_versions = { wo_php_versions = {
'php72': '7.2',
'php73': '7.3',
'php74': '7.4', 'php74': '7.4',
'php80': '8.0', 'php80': '8.0',
'php81': '8.1', 'php81': '8.1',
@@ -167,16 +161,12 @@ class WOVar():
"xml", "zip"] "xml", "zip"]
php_modules = ["php{0}-{1}".format(version_number, module) for module in wo_module] php_modules = ["php{0}-{1}".format(version_number, module) for module in wo_module]
if version_prefix == 'php72' or version_prefix == 'php73': if version_prefix == 'php74':
php_modules.append("php{0}-recode".format(version_number))
elif version_prefix == 'php74':
php_modules.extend(["php{0}-geoip".format(version_number), php_modules.extend(["php{0}-geoip".format(version_number),
"php{0}-json".format(version_number)]) "php{0}-json".format(version_number)])
return php_modules return php_modules
wo_php72 = generate_php_modules('php72', '7.2')
wo_php73 = generate_php_modules('php73', '7.3')
wo_php74 = generate_php_modules('php74', '7.4') wo_php74 = generate_php_modules('php74', '7.4')
wo_php80 = generate_php_modules('php80', '8.0') wo_php80 = generate_php_modules('php80', '8.0')
wo_php81 = generate_php_modules('php81', '8.1') wo_php81 = generate_php_modules('php81', '8.1')