diff options
Diffstat (limited to 'satellit_installer/includes/50-copyscripts.inc')
-rw-r--r-- | satellit_installer/includes/50-copyscripts.inc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/satellit_installer/includes/50-copyscripts.inc b/satellit_installer/includes/50-copyscripts.inc index 8697aa0..ff9573c 100644 --- a/satellit_installer/includes/50-copyscripts.inc +++ b/satellit_installer/includes/50-copyscripts.inc @@ -11,6 +11,28 @@ install_config_static_ip() { echo "ok." } +install_lighttpd_phpchild() { + cat > /usr/local/sbin/patch_lightdm_phpchildren <<-HEREDOC + #!/bin/bash + + # Could be written in one line, but for better editing when values change... + MEM=$(grep MemTotal /proc/meminfo|tr -s " "| cut -f 2 -d " ") # RAM + MEM=$(( $MEM / 1024 / 4 )) # to MB and a fourth + CHILDREN= $(( $MEM / 16 )) # 16 MB per child + + if [ -f /etc/lighttpd/conf-enabled ]; then + sed -i "s/\"PHP_FCGI_CHILDREN.*$/\"PHP_FCGI_CHILDREN\" => \"$CHILDREN\",/" /etc/lighttpd/conf-enabled/15-fastcgi-php.conf + else + echo "Warning: /etc/lighttpd/conf-enabled/15-fastcgi-php.conf not found!" + exit 1 + fi + exit 0 + HEREDOC + + + +} + install_slxlog() { mkdir -p "/usr/local/bin" cp -a "$BASEDIR/static_files/slxlog" "/usr/local/bin/" || perror "Could not install slxlog" |