aboutsummaryrefslogtreecommitdiff
path: root/scripts/upgrade
diff options
context:
space:
mode:
authoryalh76 <yalh@yahoo.com>2020-02-26 19:32:42 +0100
committerGitHub <noreply@github.com>2020-02-26 19:32:42 +0100
commit53aeae382eda1263d0ebf9a454bd1c3eeca8ddb1 (patch)
tree4863f9656e46cbf77b2dcde17160fe3e477d77c8 /scripts/upgrade
parentdf1d3b83108d43e898b99e26adbeea32d8961b69 (diff)
parent2b588c79f4c1a28f0ffe25781a68673abe69434c (diff)
downloadmastodon_ynh-53aeae382eda1263d0ebf9a454bd1c3eeca8ddb1.tar.gz
mastodon_ynh-53aeae382eda1263d0ebf9a454bd1c3eeca8ddb1.tar.bz2
mastodon_ynh-53aeae382eda1263d0ebf9a454bd1c3eeca8ddb1.zip
Merge pull request #195 from YunoHost-Apps/testing
Apply example_ynh
Diffstat (limited to 'scripts/upgrade')
-rw-r--r--scripts/upgrade7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/upgrade b/scripts/upgrade
index 9cfe1cc..32426a2 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -42,6 +42,7 @@ vapid_public_key=$(ynh_app_setting_get --app=$app --key=vapid_public_key)
#=================================================
# CHECK VERSION
#=================================================
+ynh_script_progression --message="Checking version..." --weight=1
upgrade_type=$(ynh_check_app_version_changed)
@@ -147,6 +148,11 @@ ynh_abort_if_errors
#=================================================
# Normalize the URL path syntax
+# N.B. : this is for app installations before YunoHost 2.7
+# where this value might be something like /foo/ or foo/
+# instead of /foo ....
+# If nobody installed your app before 2.7, then you may
+# safely remove this line
path_url=$(ynh_normalize_url_path --path_url=$path_url)
#=================================================
@@ -218,6 +224,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path
#=================================================
# ADD SWAP IF NEEDED
#=================================================
+ynh_script_progression --message="Adding swap if needed..." --weight=7
total_memory=$(ynh_check_ram)
total_swap=$(ynh_check_ram --only_swap)