diff options
author | Simon Rettberg | 2017-12-22 14:46:15 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-12-22 14:46:15 +0100 |
commit | 45e56067f0284df992c4f969918489647a9de789 (patch) | |
tree | 96af11e1d956130d950e9924c593cf2ac6c7165c /satellit_upgrader | |
parent | [SSUS] Delete incomplete 'pt' translation; remove link to translation util; f... (diff) | |
download | setup-scripts-45e56067f0284df992c4f969918489647a9de789.tar.gz setup-scripts-45e56067f0284df992c4f969918489647a9de789.tar.xz setup-scripts-45e56067f0284df992c4f969918489647a9de789.zip |
[SSUS] Patch post_max_size independenly of upload_max_filesize
Apparently there are servers out there where only the latter is
increased, so this patching logic would fail.
Diffstat (limited to 'satellit_upgrader')
-rw-r--r-- | satellit_upgrader/updater.template.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh index 7d51cd7..196ccf1 100644 --- a/satellit_upgrader/updater.template.sh +++ b/satellit_upgrader/updater.template.sh @@ -382,13 +382,16 @@ fi # ************************** PHP *************************** declare -rg PHPINIFILE=/etc/php5/cgi/php.ini -if ! grep -q 'upload_max_filesize = 100M' "$PHPINIFILE"; then - echo "* PHP: Increasing upload limit to 100MB" +if ! grep -q -E '^\s*upload_max_filesize = 100M' "$PHPINIFILE"; then + echo "PHP: Increasing upload_max_filesize to 100MB" if grep -q -E '^\s*upload_max_filesize' "$PHPINIFILE"; then sed -i -e '/^\s*upload_max_filesize/c\upload_max_filesize = 100M' "$PHPINIFILE" || pwarning "Could not increase PHP upload limit :( (1.a)" else echo "upload_max_filesize = 100M" >> "$PHPINIFILE" || pwarning "Could not incease PHP upload limit :( (2.a)" fi +fi +if ! grep -q -E '^\s*post_max_size = 100M' "$PHPINIFILE"; then + echo "PHP: Increasing post_max_size to 100MB" if grep -q -E '^\s*post_max_size' "$PHPINIFILE"; then sed -i -e '/^\s*post_max_size/c\post_max_size = 100M' "$PHPINIFILE" || pwarning "Could not increase PHP upload limit :( (1.b)" else |