xxxxxxxxxx
FILES=/etc/nginx/sites-available/*
restart=0
for f in $FILES
do
if grep -q "client_max_body_size" $f; then
echo "Setting client_max_body_size already exists in file $f "
echo "Please edit this file via Forge."
printf "\n"
else
if grep -q "# FORGE SSL" $f; then
sed -i 's/# FORGE SSL.*/client_max_body_size 100M;\n\n &/' $f
restart=1
echo "Setting client_max_body_size has been added to file $f"
printf "\n"
else
echo "Site file $f doesn't have a line with # FORGE SSL, "
echo "so it will be left untouched."
printf "\n"
fi
fi
done
if [ $restart -eq "1" ]; then
echo "Reloading Nginx server..."
printf "\n"
service nginx reload
fi
Design © 2025. ForgeRecipes loves you.
Site maintained by Vince Mitchell.
Inspired by original by David Hemphill, Tanner Hearne, & Matt Stauffer.