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