summaryrefslogtreecommitdiffstats
path: root/satellit_upgrader/updater.template.sh
diff options
context:
space:
mode:
authorChristian Rößler2016-12-16 16:32:04 +0100
committerChristian Rößler2016-12-16 16:32:04 +0100
commit42b5e20341a8360921a7aa097c50e0d27f794c7b (patch)
treed29e4c96186d0a09f7f483954508c499d7a8ed8e /satellit_upgrader/updater.template.sh
parent[SSPS] php children script to static_files (diff)
downloadsetup-scripts-42b5e20341a8360921a7aa097c50e0d27f794c7b.tar.gz
setup-scripts-42b5e20341a8360921a7aa097c50e0d27f794c7b.tar.xz
setup-scripts-42b5e20341a8360921a7aa097c50e0d27f794c7b.zip
[SSUS] php children (lightttpd): dyn. service file [to be tested]
Diffstat (limited to 'satellit_upgrader/updater.template.sh')
-rw-r--r--satellit_upgrader/updater.template.sh24
1 files changed, 23 insertions, 1 deletions
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh
index 7476232..6ea26f7 100644
--- a/satellit_upgrader/updater.template.sh
+++ b/satellit_upgrader/updater.template.sh
@@ -296,7 +296,28 @@ 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_lightdm_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
+ 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 +329,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