From c86c4ecabc2722869ed080e47c02ad947c12cb47 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Fri, 16 Aug 2019 10:04:09 +0200 Subject: [PATCH] Add lxc container detection during install --- install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install b/install index 779cc4e..53f1cb0 100755 --- a/install +++ b/install @@ -129,6 +129,7 @@ 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=$(cat /proc/1/environ) WO_ARCH="$(uname -m)" if [ -x /usr/local/bin/ee ]; then @@ -639,7 +640,7 @@ wo_remove_ee_cron() { wo_tweak_kernel() { - if [ "$WO_ARCH" = "x86_64" ]; then + if [ "$WO_ARCH" = "x86_64" ] && [ "$wo_env" != "container=lxc" ]; 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