summaryrefslogtreecommitdiffstats
path: root/satellit_installer
diff options
context:
space:
mode:
authorChristian Rößler2016-12-15 16:14:58 +0100
committerChristian Rößler2016-12-15 16:14:58 +0100
commit65fa432e4da9b2a237f0d122ef2fd26c10e8aff2 (patch)
tree8c11185c29a595b3c178d39c2be9748c80e820a8 /satellit_installer
parent[SSPS] php children not dynamic via service file patching (to be debugged!) (diff)
downloadsetup-scripts-65fa432e4da9b2a237f0d122ef2fd26c10e8aff2.tar.gz
setup-scripts-65fa432e4da9b2a237f0d122ef2fd26c10e8aff2.tar.xz
setup-scripts-65fa432e4da9b2a237f0d122ef2fd26c10e8aff2.zip
[SSPS] php children: Some stoopid bugs fixed
Diffstat (limited to 'satellit_installer')
-rw-r--r--satellit_installer/includes/10-configurations.inc4
-rw-r--r--satellit_installer/includes/50-copyscripts.inc12
2 files changed, 7 insertions, 9 deletions
diff --git a/satellit_installer/includes/10-configurations.inc b/satellit_installer/includes/10-configurations.inc
index 76448d0..9047141 100644
--- a/satellit_installer/includes/10-configurations.inc
+++ b/satellit_installer/includes/10-configurations.inc
@@ -47,14 +47,14 @@ patch_lighttpd_config() {
# service file found, patching dynamic php children value at system start via patchfile
# see includes/50-copyscripts.inc for dropping patch file /usr/local/sbin/patch_lightdm_phpchildren
if ! grep -q patch_lightdm_phpchildren /lib/systemd/system/lighttpd.service; then
- sed -i 's#\[Service\]#\[Service\]\nExecStartPre=\-/usr/local/sbin/patch_lightdm_phpchildren#g'
+ sed -i 's#\[Service\]#\[Service\]\nExecStartPre=\-/usr/local/sbin/patch_lightdm_phpchildren#g' \
+ /lib/systemd/system/lighttpd.service
fi
else
# service file not found, going old static way
sed -i 's/"PHP_FCGI_CHILDREN.*$/"PHP_FCGI_CHILDREN" => "32",/' "15-fastcgi-php.conf"
fi
-
mkdir -p "$1" || perror "Could not create $1."
}
diff --git a/satellit_installer/includes/50-copyscripts.inc b/satellit_installer/includes/50-copyscripts.inc
index ff9573c..2c4694c 100644
--- a/satellit_installer/includes/50-copyscripts.inc
+++ b/satellit_installer/includes/50-copyscripts.inc
@@ -16,21 +16,19 @@ install_lighttpd_phpchild() {
#!/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
+ MEM=\$(grep MemTotal /proc/meminfo|tr -s " "| cut -f 2 -d " ") # RAM
+ MEM=\$(( \$MEM / 1024 / 4 )) # to MB, and a fourth of RAM
+ 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
+ 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
-
-
-
+ chmod u+x /usr/local/sbin/patch_lightdm_phpchildren
}
install_slxlog() {