Add lxc container detection during install

This commit is contained in:
VirtuBox
2019-08-16 10:04:09 +02:00
parent 42fcb0cde2
commit c86c4ecabc

View File

@@ -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