From ce9f074327d7a55af3a70ec0a0c4a49a25110e29 Mon Sep 17 00:00:00 2001 From: ewilly Date: Mon, 18 Sep 2017 20:05:03 +0200 Subject: [PATCH] Update upstream version --- conf/upstream_version | 2 +- scripts/install | 16 +++++++++++++--- scripts/upgrade | 12 ++++++++++-- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/conf/upstream_version b/conf/upstream_version index 22cafd0..17e774d 100644 --- a/conf/upstream_version +++ b/conf/upstream_version @@ -1 +1 @@ -1bc078ddfcbdfebb301b49fe87fd805b6cb89a5a +670d3fa88f2e3c0f5cee1de14e7a1d5c113b106d diff --git a/scripts/install b/scripts/install index 61fe699..fe75546 100644 --- a/scripts/install +++ b/scripts/install @@ -65,11 +65,21 @@ fi sudo mv "$TMPDIR" "$final_path" # configure config file + # language ynh_replace_string "default_language='en'" "default_language='$language'" "$bozon_conf" -ynh_store_file_checksum "$bozon_conf" + + # max upload file size +case ${filesize: -1} in + g|G) + max_length=$((${filesize%?}*1024)) + ;; + *) + max_length=${filesize%?} + ;; + esac +ynh_replace_string "max_length=2048" "max_length=$max_length" "$bozon_conf" -# update auto_dropzone.php -myynh_update_bozon_auto_dropzone +ynh_store_file_checksum "$bozon_conf" # create private & data folders myynh_create_dir "$final_path/private" diff --git a/scripts/upgrade b/scripts/upgrade index f87bc8c..636c5ed 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -75,8 +75,16 @@ fi sudo cp -a "$TMPDIR/." "$final_path" sudo rm -R "$TMPDIR" -# update auto_dropzone.php -myynh_update_bozon_auto_dropzone +# update config.php with 'max_length' line +case ${filesize: -1} in + g|G) + max_length=$((${filesize%?}*1024)) + ;; + *) + max_length=${filesize%?} + ;; + esac +sed -i "54i\$max_length=$max_length;" "$bozon_conf" # set permissions myynh_set_permissions