From ee5bc6a165e573b60c7657cee7ebc8f1646f1fa8 Mon Sep 17 00:00:00 2001 From: nemsia Date: Tue, 15 May 2018 16:39:10 +0200 Subject: [PATCH] Make upgrade from sources --- scripts/upgrade | 116 ++++++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 49 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 54cdd8f..71f4e1b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,6 +15,7 @@ source /usr/share/yunohost/helpers # See comments in install script app=$YNH_APP_INSTANCE_NAME +db_name=$app # Retrieve app settings domain=$(ynh_app_setting_get "$app" domain) @@ -66,41 +67,11 @@ ynh_abort_if_errors path_url=$(ynh_normalize_url_path $path_url) #================================================= -# STANDARD UPGRADE STEPS +# INSTALL DEPENDENCIES #================================================= -# TODO TODO TODO -#================================================= - -db_name=$app - -# Modify Nginx configuration file and copy it to Nginx conf directory -sudo sed -i "s@__PATH__@$app@g" ../conf/nginx.conf* -sudo sed -i "s@__FINALPATH__@$final_path@g" ../conf/nginx.conf* -sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf - -# Stop Mastodon Services -sudo systemctl stop mastodon-*.service - -# Change owner of live folder -sudo chown -R $app: $final_path/live - -# Download Mastodon -sudo su - $app <