From 3130eaa185f311d9f95b1620fc68b4174f5c1be6 Mon Sep 17 00:00:00 2001 From: ewilly Date: Tue, 26 Apr 2016 20:59:30 +0200 Subject: [PATCH] Fix filesize as setting --- scripts/upgrade | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 3a95b29..e44d0a2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,6 +11,13 @@ app=bozon path=$(sudo yunohost app setting $app path) stable=$(sudo yunohost app setting $app version) is_public=$(sudo yunohost app setting $app is_public) +filesize=$(sudo yunohost app setting $app filesize) +if [ "${#filesize}" -eq 0 ] +then # in old script filesize was not saved as an setting + domain=$(sudo yunohost app setting $app domain) + filesize=$(cat /etc/nginx/conf.d/$domain.d/$app.conf | grep -Po 'client_max_body_size \K.*(?=;)') + sudo yunohost app setting $app filesize -v "$filesize" +fi # definie useful vars parent_path=/var/www