From 913169bf67a5e39ca8c449097a99cafa6e573ff4 Mon Sep 17 00:00:00 2001 From: whypsi Date: Sun, 5 Mar 2017 17:40:21 +0100 Subject: [PATCH] Fixes restore script Now makes sure dependencies are installed --- scripts/functions.sh | 4 ++++ scripts/install | 4 ---- scripts/restore | 10 ++++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/scripts/functions.sh b/scripts/functions.sh index c810641..1c2c425 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -2,6 +2,10 @@ set -eu +install_dependencies() { + sudo apt-get install --quiet --yes python-msgpack python-gevent +} + app_config_get() { local app_config=$1 local attribute=$2 diff --git a/scripts/install b/scripts/install index a66ebcb..4393262 100755 --- a/scripts/install +++ b/scripts/install @@ -6,10 +6,6 @@ set -eu source /usr/share/yunohost/helpers source functions.sh -install_dependencies() { - sudo apt-get install --yes python-msgpack python-gevent -} - nginx_config_file() { local app=$1 local domain=$2 diff --git a/scripts/restore b/scripts/restore index 7059952..42dbebf 100755 --- a/scripts/restore +++ b/scripts/restore @@ -3,6 +3,14 @@ set -eu source /usr/share/yunohost/helpers +# TODO: enable with fix of https://github.com/YunoHost/yunohost/pull/246 +# source .hfunctions + +# TODO: remove with fix of https://github.com/YunoHost/yunohost/pull/246 +install_dependencies() { + sudo apt-get install --quiet --yes python-msgpack python-gevent +} + main() { local app=$YNH_APP_INSTANCE_NAME local deploy_path=$(ynh_app_setting_get $app deploy_path) @@ -15,6 +23,8 @@ main() { local url=$(ynh_app_setting_get $app url) + install_dependencies + sudo yunohost app checkurl $url -a $app sudo cp -a "./sources" $deploy_path