Almost there, don't use this yet
This commit is contained in:
5
install
5
install
@@ -63,7 +63,7 @@ fi
|
||||
###
|
||||
wo_branch=$1
|
||||
readonly wo_version_old="2.2.3"
|
||||
readonly wo_version_new="3.8.5"
|
||||
readonly wo_version_new="3.8.6"
|
||||
readonly wo_log_dir=/var/log/wo/
|
||||
readonly wo_install_log=/var/log/wo/install.log
|
||||
readonly wo_linux_distro=$(lsb_release -i | awk '{print $3}')
|
||||
@@ -447,7 +447,6 @@ if [ -f /etc/ImageMagick/policy.xml ]
|
||||
systemctl restart nginx &>> /dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f /etc/nginx/nginx.conf ]; then
|
||||
sed -i "s/.*X-Powered-By.*/\tadd_header X-Powered-By \"WordOps $wo_version_new\";/" /etc/nginx/nginx.conf &>> /dev/null
|
||||
@@ -675,4 +674,4 @@ echo
|
||||
wo_lib_echo_info "source /etc/bash_completion.d/wo_auto.rc"
|
||||
echo
|
||||
wo_lib_echo "Yay! WordOps (wo) installed/updated successfully"
|
||||
wo_lib_echo "WordOps (wo) help: https://wordops.org/docs"
|
||||
wo_lib_echo "WordOps (wo) help: https://wordops.org/docs"
|
||||
@@ -455,9 +455,7 @@ class WOSiteCreateController(CementBaseController):
|
||||
|
||||
if data and self.app.pargs.php7:
|
||||
if (not self.app.pargs.experimental):
|
||||
Log.info(self, "PHP7.0 is experimental feature and it may not "
|
||||
"work with all CSS/JS/Cache of your site.\nDo you wish"
|
||||
" to install PHP 7.0 now for {0}?".format(wo_domain))
|
||||
Log.info(self, "Do you wish to install PHP 7.2 now for {0}?".format(wo_domain))
|
||||
|
||||
# Check prompt
|
||||
check_prompt = input("Type \"y\" to continue [n]:")
|
||||
@@ -566,9 +564,9 @@ class WOSiteCreateController(CementBaseController):
|
||||
return
|
||||
|
||||
if data['php7']:
|
||||
php_version = "7.0"
|
||||
php_version = "7.2"
|
||||
else:
|
||||
php_version = "5.6"
|
||||
php_version = "7.2"
|
||||
|
||||
|
||||
addNewSite(self, wo_domain, stype, cache, wo_site_webroot,
|
||||
|
||||
@@ -722,12 +722,12 @@ def site_package_check(self, stype):
|
||||
|
||||
if self.app.pargs.php7 and stype in [ 'mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
|
||||
if (WOVariables.wo_platform_codename == 'trusty' or WOVariables.wo_platform_codename == 'xenial' or WOVariables.wo_platform_codename == 'bionic'):
|
||||
Log.debug(self, "Setting apt_packages variable for PHP 5.6")
|
||||
if not WOAptGet.is_installed(self, 'php5.6-fpm'):
|
||||
apt_packages = apt_packages + WOVariables.wo_php5_6
|
||||
Log.debug(self, "Setting apt_packages variable for PHP 7.2")
|
||||
if not WOAptGet.is_installed(self, 'php7.2-fpm'):
|
||||
apt_packages = apt_packages + WOVariables.wo_php7_2 + WOVariables.wo_php_extra
|
||||
Log.debug(self, "Setting apt_packages variable for PHP 7.0")
|
||||
if not WOAptGet.is_installed(self, 'php7.0-fpm'):
|
||||
apt_packages = apt_packages + WOVariables.wo_php7_0 + WOVariables.wo_php_extra
|
||||
apt_packages = apt_packages + WOVariables.wo_php7_2 + WOVariables.wo_php_extra
|
||||
else:
|
||||
if WOVariables.wo_platform_codename == 'wheezy':
|
||||
Log.warn(self, "PHP 7.0 not available for your system.")
|
||||
@@ -739,7 +739,7 @@ def site_package_check(self, stype):
|
||||
else:
|
||||
Log.debug(self, "Setting apt_packages variable for PHP 7.0")
|
||||
if not WOAptGet.is_installed(self, 'php7.0-fpm'):
|
||||
apt_packages = apt_packages + WOVariables.wo_php7_0
|
||||
apt_packages = apt_packages + WOVariables.wo_php7_2
|
||||
|
||||
if stype in ['mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
|
||||
Log.debug(self, "Setting apt_packages variable for MySQL")
|
||||
@@ -852,7 +852,7 @@ def site_package_check(self, stype):
|
||||
|
||||
Log.debug(self, "Setting apt_packages variable for PHP 7.0")
|
||||
if not WOAptGet.is_installed(self, 'php7.0-fpm'):
|
||||
apt_packages = apt_packages + WOVariables.wo_php7_0 + WOVariables.wo_php_extra
|
||||
apt_packages = apt_packages + WOVariables.wo_php7_2 + WOVariables.wo_php_extra
|
||||
|
||||
if os.path.isdir("/etc/nginx/common") and (not
|
||||
os.path.isfile("/etc/nginx/common/php7.conf")):
|
||||
|
||||
@@ -1015,7 +1015,7 @@ class WOStackController(CementBaseController):
|
||||
WOService.restart_service(self, 'php5.6-fpm')
|
||||
|
||||
#PHP7.0 configuration for debian
|
||||
if (WOVariables.wo_platform_codename == 'jessie' ) and set(WOVariables.wo_php7_0).issubset(set(apt_packages)):
|
||||
if (WOVariables.wo_platform_codename == 'jessie' ) and set(WOVariables.wo_php7_2).issubset(set(apt_packages)):
|
||||
# Create log directories
|
||||
if not os.path.exists('/var/log/php/7.2/'):
|
||||
Log.debug(self, 'Creating directory /var/log/php/7.2/')
|
||||
@@ -1137,7 +1137,7 @@ class WOStackController(CementBaseController):
|
||||
WOService.restart_service(self, 'php7.0-fpm')
|
||||
|
||||
#preconfiguration for php7.0
|
||||
if (WOVariables.wo_platform_codename == 'trusty' or WOVariables.wo_platform_codename == 'xenial' or WOVariables.wo_platform_codename == 'bionic') and set(WOVariables.wo_php7_0).issubset(set(apt_packages)):
|
||||
if (WOVariables.wo_platform_codename == 'trusty' or WOVariables.wo_platform_codename == 'xenial' or WOVariables.wo_platform_codename == 'bionic') and set(WOVariables.wo_php7_2).issubset(set(apt_packages)):
|
||||
# Create log directories
|
||||
if not os.path.exists('/var/log/php/7.2/'):
|
||||
Log.debug(self, 'Creating directory /var/log/php/7.2/')
|
||||
|
||||
@@ -12,7 +12,7 @@ class WOVariables():
|
||||
"""Intialization of core variables"""
|
||||
|
||||
# WordOps version
|
||||
wo_version = "3.8.5"
|
||||
wo_version = "3.8.6"
|
||||
# WordOps packages versions
|
||||
wo_wp_cli = "2.0.1"
|
||||
wo_adminer = "4.6.3"
|
||||
@@ -81,7 +81,7 @@ class WOVariables():
|
||||
|
||||
# WordOps stack installation variables
|
||||
# Nginx repo and packages
|
||||
elif wo_platform_codename == 'trusty':
|
||||
if wo_platform_codename == 'trusty':
|
||||
wo_nginx_repo = ("deb http://download.opensuse.org/repositories/home:"
|
||||
"/rtCamp:/EasyEngine/xUbuntu_14.04/ /")
|
||||
elif wo_platform_codename == 'xenial':
|
||||
|
||||
Reference in New Issue
Block a user