From ea571250f1a895bf1de2ff0ac34559f4ccd70c36 Mon Sep 17 00:00:00 2001 From: jb Date: Tue, 26 Sep 2017 17:01:57 +0200 Subject: [PATCH] Fix restore and upgrade scripts --- scripts/install | 1 + scripts/restore | 2 +- scripts/upgrade | 18 +++++++++++++----- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index d99803a..f14809e 100755 --- a/scripts/install +++ b/scripts/install @@ -62,6 +62,7 @@ ynh_app_setting_set "$app" domain "$domain" ynh_app_setting_set "$app" path "$path_url" ynh_app_setting_set "$app" admin "$admin" ynh_app_setting_set "$app" is_public "$is_public" +ynh_app_setting_set "$app" final_path "$final_path" #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/restore b/scripts/restore index 6a0145a..5cd3469 100755 --- a/scripts/restore +++ b/scripts/restore @@ -87,7 +87,7 @@ ynh_install_app_dependencies libxml2-dev libxslt-dev libfreetype6-dev \ ynh_psql_test_if_first_run db_pwd=$(ynh_app_setting_get "$app" pgsqlpwd) -ynh_psql_setup_db "$db_name $db_name" "$db_pwd" +ynh_psql_setup_db "$db_name" "$db_name" "$db_pwd" ynh_psql_connect_as "$db_name" "$db_pwd" "$db_name" < ./db.sql #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index b83db53..dd690cb 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -51,11 +51,6 @@ path_url=$(ynh_normalize_url_path $path_url) #================================================= # STANDARD UPGRADE STEPS #================================================= -# DOWNLOAD, CHECK AND UNPACK SOURCE -#================================================= - -# Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source "$final_path" #================================================= # NGINX CONFIGURATION @@ -73,6 +68,19 @@ ynh_system_user_create_smtp "$app" "$smtp_pwd" #================================================= # SPECIFIC UPGRADE +#================================================= + +#================================================= +# PIP INSTALLATION +#================================================= + +( + set +eu + source "${final_path}/venv/bin/activate" + "${final_path}/venv/bin/pip" install Weblate==2.16 + "${final_path}/venv/bin/pip" install pytz python-bidi PyYaML Babel pyuca pylibravatar pydns psycopg2 +) + #================================================= # Migrate databases #=================================================