Skip to content
Permalink
Browse files

add LOWMEM_INSTALL variable support in 123.09beta01

When set to LOWMEM_INSTALL='y' in persistent config file /etc/centminmod/custom_config.inc which you create prior to initial Centmin Mod 123.09beta01 and higher installs, the option will disable certain Centmin Mod optimisations and nginx and php modules to speed up initial install and reduce the potential maximum memory footprint by disabling some nginx and php modules. LOWMEM_INSTALL='y' will override any relevant variable set in /etc/centminmod/custom_config.inc with ones set via /usr/local/src/centminmod/inc/lowmem.inc
  • Loading branch information...
centminmod committed Mar 16, 2017
1 parent 80699b4 commit 4f726989207d7f9225fecf3950a691176dd16e5e
Showing with 32 additions and 0 deletions.
  1. +5 −0 centmin.sh
  2. +27 −0 inc/lowmem.inc
@@ -688,6 +688,7 @@ source "inc/cpucount.inc"
source "inc/motd.inc"
source "inc/cpcheck.inc"
source "inc/memcheck.inc"
source "inc/lowmem.inc"
source "inc/ccache.inc"
source "inc/bookmark.inc"
source "inc/centminlogs.inc"
@@ -864,6 +865,10 @@ if [ -f "${CM_INSTALLDIR}/inc/z_custom.inc" ]; then
cat "${CM_INSTALLDIR}/inc/z_custom.inc" > "${CENTMINLOGDIR}/inc-zcustom-config-settings_${DT}.log"
fi
fi

# function checks if persistent config file has low mem variable enabled
# LOWMEM_INSTALL='y'
checkfor_lowmem
###############################################################
# FUNCTIONS

@@ -0,0 +1,27 @@
checkfor_lowmem() {
if [[ "$LOWMEM_INSTALL" = [yY] ]]; then
CLANG='y'
CLANG_PHP='y'
GCCINTEL_PHP='n'
PHP_PGO='n'
PHP_PGO_CENTOSSIX='n'
DEVTOOLSETSIX='n'
NGINX_DEVTOOLSETGCC='n'
GENERAL_DEVTOOLSETGCC='n'
CRYPTO_DEVTOOLSETGCC='n'
NGINXPATCH='n'
NGINX_GEOIPMEM='n' # Nginx caches GEOIP databases in memory (default), setting 'n' caches to disk instead
NGINX_SECURELINK='n'
NGINX_FANCYINDEX='n'
NGINX_VHOSTSTATS='n'
NGINX_LIBBROTLI='n'
NGINX_PAGESPEED='n'
NGINX_HTTPREDIS='n'
ORESTY_LUANGINX='n'
PHPFINFO='n'
PHPMAILPARSE='n'
LIBRESSL_SWITCH='y'
PHP_FTPEXT='n'
NSD_INSTALL='n'
fi
}

0 comments on commit 4f72698

Please sign in to comment.
You can’t perform that action at this time.