From 5de2e29170241b7c6dfee2b60dc944ab88b373b7 Mon Sep 17 00:00:00 2001 From: anmol Date: Fri, 9 Nov 2018 23:57:09 +0530 Subject: [PATCH] Fixed psql in upgrade restore and backup --- scripts/backup | 2 +- scripts/restore | 2 +- scripts/upgrade | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/backup b/scripts/backup index 40babe0..e1245b5 100755 --- a/scripts/backup +++ b/scripts/backup @@ -8,7 +8,7 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -source psql.sh +source ../settings/scripts/psql.sh #================================================= # MANAGE SCRIPT FAILURE diff --git a/scripts/restore b/scripts/restore index 9e8d363..833979a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -8,7 +8,7 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -source psql.sh +source ../settings/scripts/psql.sh #================================================= # MANAGE SCRIPT FAILURE diff --git a/scripts/upgrade b/scripts/upgrade index af7031d..a6327a5 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -8,6 +8,7 @@ source _common.sh source /usr/share/yunohost/helpers +source ../settings/scripts/psql.sh #================================================= # LOAD SETTINGS @@ -98,9 +99,11 @@ ynh_install_app_dependencies gettext postgresql postgresql-contrib libpq-dev git ( cd $final_path/$app && git pull ) # Give permisiion to the final_path chown -R "$app":"$app" "$final_path" +export PATH="$PATH:/var/www/$app/.cargo/bin:/var/$app/.local/bin:/usr/local/sbin" +export FEATURES=postgres ( cd $final_path/$app && sudo -u "$app" cargo install --force ) ( cd $final_path/$app && sudo -u "$app" cargo install --path plume-cli --force ) -( cd $final_path/$app && sudo -u "$app" diesel migration run ) +( cd $final_path/$app && diesel migration run ) # Recalculate and store the config file checksum into the app settings