Skip to content
Permalink
Browse files

Only restart apache once

  • Loading branch information...
NEMS Linux
NEMS Linux committed Feb 27, 2019
1 parent dfa67e9 commit 80e1a67cf87a9848c0b020baa1193e0b41066d2c
Showing with 5 additions and 1 deletion.
  1. +5 −1 fixes.sh
@@ -292,16 +292,20 @@ if (( $(awk 'BEGIN {print ("'$ver'" >= "'1.5'")}') )); then

# Increase upload size for background images
if [[ -e /etc/php/7.3/phpdbg/php.ini ]]; then
reloadapache=0
if ! grep -q "NEMS00001" /etc/php/7.3/phpdbg/php.ini; then
/bin/sed -i '/post_max_size =/c\; NEMS00001\npost_max_size = 20M' /etc/php/7.3/phpdbg/php.ini
/bin/sed -i '/upload_max_filesize =/c\upload_max_filesize = 16M' /etc/php/7.3/phpdbg/php.ini
/bin/systemctl reload apache2
reloadapache=1
fi
fi
if [[ -e /etc/php/7.2/phpdbg/php.ini ]]; then
if ! grep -q "NEMS00001" /etc/php/7.2/phpdbg/php.ini; then
/bin/sed -i '/post_max_size =/c\; NEMS00001\npost_max_size = 20M' /etc/php/7.2/phpdbg/php.ini
/bin/sed -i '/upload_max_filesize =/c\upload_max_filesize = 16M' /etc/php/7.2/phpdbg/php.ini
reloadapache=1
fi
if [[ $reloadapache == 1 ]]; then
/bin/systemctl reload apache2
fi
fi

0 comments on commit 80e1a67

Please sign in to comment.
You can’t perform that action at this time.