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 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_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)"
|
||||
|
||||
if [ -x /usr/local/bin/ee ]; then
|
||||
@@ -653,7 +654,7 @@ wo_remove_ee_cron() {
|
||||
|
||||
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
|
||||
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
|
||||
@@ -813,8 +814,7 @@ else
|
||||
if [ -x /usr/local/bin/wo ]; then
|
||||
if [ -z "$wo_force_install" ]; then
|
||||
if { wo -v 2>&1 | grep -q "$wo_version_new"; }; then
|
||||
wo_lib_error "You already have WordOps $wo_version_new"
|
||||
exit 1
|
||||
wo_lib_error "You already have WordOps $wo_version_new" 1
|
||||
fi
|
||||
fi
|
||||
wo_lib_echo "Installing wo dependencies " | tee -ai $wo_install_log
|
||||
@@ -861,8 +861,7 @@ else
|
||||
if [ -z "$wo_force_install" ]; then
|
||||
echo -e "Migrate from EasyEngine to WordOps (y/n): " && read -r WO_ANSWER
|
||||
if [ "$WO_ANSWER" != "y" ] && [ "$WO_ANSWER" != "Y" ]; then
|
||||
wo_lib_error "Not installing WordOps, exit status = " 1
|
||||
exit 1
|
||||
wo_lib_error "Not installing WordOps" 1
|
||||
fi
|
||||
fi
|
||||
wo_lib_echo "Installing wo dependencies " | tee -ai $wo_install_log
|
||||
|
||||
@@ -499,10 +499,8 @@ class WOSiteCreateController(CementBaseController):
|
||||
|
||||
if data and pargs.php73:
|
||||
data['php73'] = True
|
||||
php73 = 1
|
||||
elif data:
|
||||
data['php73'] = False
|
||||
php73 = 0
|
||||
|
||||
if ((not pargs.wpfc) 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 "
|
||||
.format(WOVariables.wo_wpcli_path) +
|
||||
"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:
|
||||
raise SiteError("Cleaning WordPress install failed")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user