Fix vhostonly and exit status in install
This commit is contained in:
11
install
11
install
@@ -151,7 +151,8 @@ readonly TIME=$(date +"$TIME_FORMAT")
|
|||||||
readonly NGINX_BACKUP_FILE="/var/lib/wo-backup/nginx-backup.$TIME.tar.gz"
|
readonly NGINX_BACKUP_FILE="/var/lib/wo-backup/nginx-backup.$TIME.tar.gz"
|
||||||
readonly EE_BACKUP_FILE="/var/lib/wo-backup/ee-backup.$TIME.tar.gz"
|
readonly EE_BACKUP_FILE="/var/lib/wo-backup/ee-backup.$TIME.tar.gz"
|
||||||
readonly WO_BACKUP_FILE="/var/lib/wo-backup/wo-backup.$TIME.tar.gz"
|
readonly WO_BACKUP_FILE="/var/lib/wo-backup/wo-backup.$TIME.tar.gz"
|
||||||
readonly wo_env=$(grep "container=lxc" /proc/1/environ)
|
readonly wo_lxc=$(grep "container=lxc" /proc/1/environ)
|
||||||
|
readonly wo_wsl=$(grep "wsl" /proc/1/environ)
|
||||||
WO_ARCH="$(uname -m)"
|
WO_ARCH="$(uname -m)"
|
||||||
|
|
||||||
if [ -x /usr/local/bin/ee ]; then
|
if [ -x /usr/local/bin/ee ]; then
|
||||||
@@ -653,7 +654,7 @@ wo_remove_ee_cron() {
|
|||||||
|
|
||||||
wo_tweak_kernel() {
|
wo_tweak_kernel() {
|
||||||
|
|
||||||
if [ "$WO_ARCH" = "x86_64" ] && [ -z "$wo_env" ]; then
|
if [ "$WO_ARCH" = "x86_64" ] && [ -z "$wo_lxc" ] && [ -z "$wo_wsl" ]; then
|
||||||
rm -f /etc/sysctl.d/60-ubuntu-nginx-web-server.conf
|
rm -f /etc/sysctl.d/60-ubuntu-nginx-web-server.conf
|
||||||
wget -qO /etc/sysctl.d/60-wo-tweaks.conf https://raw.githubusercontent.com/WordOps/WordOps/"$wo_branch"/wo/cli/templates/sysctl.mustache
|
wget -qO /etc/sysctl.d/60-wo-tweaks.conf https://raw.githubusercontent.com/WordOps/WordOps/"$wo_branch"/wo/cli/templates/sysctl.mustache
|
||||||
if [ "$wo_distro_version" = "bionic" ] || [ "$wo_distro_version" = "disco" ] || [ "$wo_distro_version" = "buster" ]; then
|
if [ "$wo_distro_version" = "bionic" ] || [ "$wo_distro_version" = "disco" ] || [ "$wo_distro_version" = "buster" ]; then
|
||||||
@@ -813,8 +814,7 @@ else
|
|||||||
if [ -x /usr/local/bin/wo ]; then
|
if [ -x /usr/local/bin/wo ]; then
|
||||||
if [ -z "$wo_force_install" ]; then
|
if [ -z "$wo_force_install" ]; then
|
||||||
if { wo -v 2>&1 | grep -q "$wo_version_new"; }; then
|
if { wo -v 2>&1 | grep -q "$wo_version_new"; }; then
|
||||||
wo_lib_error "You already have WordOps $wo_version_new"
|
wo_lib_error "You already have WordOps $wo_version_new" 1
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
wo_lib_echo "Installing wo dependencies " | tee -ai $wo_install_log
|
wo_lib_echo "Installing wo dependencies " | tee -ai $wo_install_log
|
||||||
@@ -861,8 +861,7 @@ else
|
|||||||
if [ -z "$wo_force_install" ]; then
|
if [ -z "$wo_force_install" ]; then
|
||||||
echo -e "Migrate from EasyEngine to WordOps (y/n): " && read -r WO_ANSWER
|
echo -e "Migrate from EasyEngine to WordOps (y/n): " && read -r WO_ANSWER
|
||||||
if [ "$WO_ANSWER" != "y" ] && [ "$WO_ANSWER" != "Y" ]; then
|
if [ "$WO_ANSWER" != "y" ] && [ "$WO_ANSWER" != "Y" ]; then
|
||||||
wo_lib_error "Not installing WordOps, exit status = " 1
|
wo_lib_error "Not installing WordOps" 1
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
wo_lib_echo "Installing wo dependencies " | tee -ai $wo_install_log
|
wo_lib_echo "Installing wo dependencies " | tee -ai $wo_install_log
|
||||||
|
|||||||
@@ -499,10 +499,8 @@ class WOSiteCreateController(CementBaseController):
|
|||||||
|
|
||||||
if data and pargs.php73:
|
if data and pargs.php73:
|
||||||
data['php73'] = True
|
data['php73'] = True
|
||||||
php73 = 1
|
|
||||||
elif data:
|
elif data:
|
||||||
data['php73'] = False
|
data['php73'] = False
|
||||||
php73 = 0
|
|
||||||
|
|
||||||
if ((not pargs.wpfc) and
|
if ((not pargs.wpfc) and
|
||||||
(not pargs.wpsc) and
|
(not pargs.wpsc) and
|
||||||
|
|||||||
@@ -610,7 +610,10 @@ def setupwordpress(self, data, vhostonly=False):
|
|||||||
WOShellExec.cmd_exec(self, "/bin/bash -c \"{0} --allow-root "
|
WOShellExec.cmd_exec(self, "/bin/bash -c \"{0} --allow-root "
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
.format(WOVariables.wo_wpcli_path) +
|
||||||
"db clean --yes\"")
|
"db clean --yes\"")
|
||||||
WOFileUtils.rm(self, "{0}/htdocs/*".format(wo_site_webroot))
|
WOFileUtils.rm(self, "{0}/htdocs".format(wo_site_webroot))
|
||||||
|
WOFileUtils.mkdir(self, "{0}/htdocs".format(wo_site_webroot))
|
||||||
|
WOFileUtils.chown(self, "{0}/htdocs".format(wo_site_webroot),
|
||||||
|
'www-data', 'www-data')
|
||||||
except CommandExecutionError:
|
except CommandExecutionError:
|
||||||
raise SiteError("Cleaning WordPress install failed")
|
raise SiteError("Cleaning WordPress install failed")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user