summaryrefslogtreecommitdiffstats
path: root/satellit_installer/includes
diff options
context:
space:
mode:
authorChristian Rößler2016-08-12 18:52:40 +0200
committerChristian Rößler2016-08-12 18:52:40 +0200
commit90802eb98bfe97cee92589a9b975a28f8b6d63e1 (patch)
tree5f2331fd89bc9ea98c65fa5b1ad61ae366bf601c /satellit_installer/includes
parent[SSPS] Update slxadmin config (diff)
downloadsetup-scripts-90802eb98bfe97cee92589a9b975a28f8b6d63e1.tar.gz
setup-scripts-90802eb98bfe97cee92589a9b975a28f8b6d63e1.tar.xz
setup-scripts-90802eb98bfe97cee92589a9b975a28f8b6d63e1.zip
[SSPS] new funct. patch_php_config: Patches /etc/php5/cgi/php.ini upl.filsiz=100M
Diffstat (limited to 'satellit_installer/includes')
-rw-r--r--satellit_installer/includes/10-configurations.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/satellit_installer/includes/10-configurations.inc b/satellit_installer/includes/10-configurations.inc
index 61af842..54bb4f8 100644
--- a/satellit_installer/includes/10-configurations.inc
+++ b/satellit_installer/includes/10-configurations.inc
@@ -45,6 +45,22 @@ patch_lighttpd_config() {
mkdir -p "$1" || perror "Could not create $1."
}
+patch_php_config() {
+ echo -n "# Patching php configuration... "
+ local PHPINIFILE=./php.ini
+ grep -E "^\s*upload_max_filesize" "$PHPINIFILE" # 2>/dev/null 1>&2
+
+ if [ "$?" -eq 0 ]; then
+ echo -n "upload_max_filesize entry found; patching to 100M... "
+ sed -i.sik -e '/^\s*upload_max_filesize/c\upload_max_filesize = 100M' "$PHPINIFILE"
+ else
+ echo -n "no upload_max_filesize entry found; appending 100M entry... "
+ echo "upload_max_filesize = 100M" >> "$PHPINIFILE"
+ fi
+ echo "ok."
+ service lighttpd reload
+}
+
config_nfs() {
echo -n "# Patching /etc/exports for NFS... "
if [ $(grep -c "/srv/openslx/nfs" /etc/exports) -gt 0 ]; then