aboutsummaryrefslogtreecommitdiff
path: root/scripts/upgrade
diff options
context:
space:
mode:
authoryalh76 <yalh@yahoo.com>2020-02-23 18:44:50 +0100
committeryalh76 <yalh@yahoo.com>2020-02-23 18:44:50 +0100
commit6ff11dacb201a08506b345953aa7b9bd39eeacf5 (patch)
treeec12b2eca75ba3701644f50fd04d16a0c4f49528 /scripts/upgrade
parentea70a2cd4f17daecf49e2b414c0e95e4385cf1a6 (diff)
downloadmastodon_ynh-6ff11dacb201a08506b345953aa7b9bd39eeacf5.tar.gz
mastodon_ynh-6ff11dacb201a08506b345953aa7b9bd39eeacf5.tar.bz2
mastodon_ynh-6ff11dacb201a08506b345953aa7b9bd39eeacf5.zip
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)