diff options
Diffstat (limited to 'install/ishtar-prepare-instance')
-rwxr-xr-x | install/ishtar-prepare-instance | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/install/ishtar-prepare-instance b/install/ishtar-prepare-instance index d9467247b..fec08b119 100755 --- a/install/ishtar-prepare-instance +++ b/install/ishtar-prepare-instance @@ -134,6 +134,31 @@ EOF done fi + if [ ! -z '$MAX_UPLOAD_SIZE' ]; then + MAX_UPLOAD_SIZE='' + cat >&2 <<-'EOF' + +------------------------------------------------------------------------------- + A maximum size for file upload is set. By default, the limit is set to 100 + Mo. Consider raising or lowering this value to fit to your needs. + Note: to change this value after the installation change client_max_body_size + it in the nginx configuration file and MAX_UPLOAD_SIZE in local_settings. + +EOF + re_number='^[0-9]+$' + while ! [[ "$MAX_UPLOAD_SIZE" =~ $re_number ]] + do + cecho y "* Max upload size in Mo (default: 100)? " + read choice + MAX_UPLOAD_SIZE=$choice + if [ "$MAX_UPLOAD_SIZE" == '' ]; then + MAX_UPLOAD_SIZE=100 + fi + done + fi + + + DEST=$ISHTAR_PATH cat >&2 <<-'EOF' @@ -242,6 +267,7 @@ EOF s|#DB_NAME#|$DB_NAME|g;\ s|#DB_PORT#|$DB_PORT|g;\ s|#DB_PASSWORD#|$DB_PASSWORD|g;\ + s|#MAX_UPLOAD_SIZE#|$MAX_UPLOAD_SIZE|g;\ s|#URL#|$URL|g;\ s|#APP_DIR#|$APP_DIR|g;\ s|#SECRET_KEY#|$SECRET_KEY|g;" \ @@ -272,6 +298,7 @@ EOF s|#UWSGI_PORT#|$UWSGI_PORT|g;\ s|#NGINX_PORT#|$NGINX_PORT|g;\ s|#INSTALL_PATH#|$INSTALL_PATH|g;\ + s|#MAX_UPLOAD_SIZE#|$MAX_UPLOAD_SIZE|g;\ s|#URL#|$URL|g;" \ "install/nginx.conf.template" > \ "$INSTANCE/nginx.conf" |