summaryrefslogtreecommitdiffstats
path: root/satellit_upgrader
diff options
context:
space:
mode:
authorSimon Rettberg2017-01-16 15:11:26 +0100
committerSimon Rettberg2017-01-16 15:11:26 +0100
commitd3b17f53180cf8da83568d00a6b0504ebe273cb4 (patch)
tree9e6c33d61e3b174ef0aa887c42f93a4c90e41d5b /satellit_upgrader
parent[SSUS] Fix test condition for sudo config (diff)
parent[SSUS] php children part tested as snippet ok (as bl-server-3.0-ovf hangs the... (diff)
downloadsetup-scripts-d3b17f53180cf8da83568d00a6b0504ebe273cb4.tar.gz
setup-scripts-d3b17f53180cf8da83568d00a6b0504ebe273cb4.tar.xz
setup-scripts-d3b17f53180cf8da83568d00a6b0504ebe273cb4.zip
Merge branch 'master' of git.openslx.org:bwlp/setup-scripts
Diffstat (limited to 'satellit_upgrader')
-rwxr-xr-xsatellit_upgrader/pack-update.sh1
-rw-r--r--satellit_upgrader/updater.template.sh26
2 files changed, 26 insertions, 1 deletions
diff --git a/satellit_upgrader/pack-update.sh b/satellit_upgrader/pack-update.sh
index 9e6d3b6..32a6fe4 100755
--- a/satellit_upgrader/pack-update.sh
+++ b/satellit_upgrader/pack-update.sh
@@ -103,6 +103,7 @@ addpayload "TGZ_LDADP" "ldap/ad proxy"
addinstallfile "atftpd.service"
addinstallfile "lighttpd.conf"
addinstallfile "slxadmin-config.php"
+addinstallfile "patch_lighttpd_phpchildren"
# TODO: Unify more
source ../satellit_installer/includes/10-sudo_config.inc
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh
index 2e4ab13..8a9076b 100644
--- a/satellit_upgrader/updater.template.sh
+++ b/satellit_upgrader/updater.template.sh
@@ -296,7 +296,30 @@ if [ -e "$FILEDIR/lighttpd.conf" ] && [ -e "/etc/lighttpd/lighttpd.conf" ]; then
echo "lighttpd config upgrade complete"
fi
+# ********************** lighttpd php_children *************
+
+echo "* lighttpd: dynamic php children value"
+echo -n "Looking for lighttpd service file..."
+if [ -f /lib/systemd/system/lighttpd.service ]; then
+ # service file found, patching dynamic php children value at system start via patchfile
+ if ! grep -q patch_lighttpd_phpchildren /lib/systemd/system/lighttpd.service; then
+ echo -n " found. Patching service file ... "
+ sed -i 's#\[Service\]#\[Service\]\nExecStartPre=\-/usr/local/sbin/patch_lighttpd_phpchildren#g' \
+ /lib/systemd/system/lighttpd.service || perror "Could not patch service file!"
+ cp "$FILEDIR/patch_lighttpd_phpchildren" /usr/local/sbin || perror "Could not copy patch_lighttpd_phpchildren script!"
+ chmod +x /usr/local/sbin/patch_lighttpd_phpchildren # Just to sleep better in dark nights.
+ echo " done."
+ systemctl daemon-reload
+ RESTART_LIGHTY=ja
+ else
+ echo " patch_lighttpd_phpchildren entry already there, doing nothing."
+ fi
+else
+ echo " not found. Doing nothing."
+fi
+
# ************************** PHP ***************************
+
declare -rg PHPINIFILE=/etc/php5/cgi/php.ini
if ! grep -q 'upload_max_filesize = 100M' "$PHPINIFILE"; then
echo "* Increasing php upload limit"
@@ -308,7 +331,8 @@ if ! grep -q 'upload_max_filesize = 100M' "$PHPINIFILE"; then
RESTART_LIGHTY=ja
fi
-# **
+# ************************** LIGHTY ************************
+
if [ -n "$RESTART_LIGHTY" ]; then
echo "* Restarting lighttpd"
restart_service lighttpd