From 138a6f6f0e20961a3174efc40d5a86df9c67d0f7 Mon Sep 17 00:00:00 2001 From: Julien VAUBOURG Date: Mon, 13 Jul 2015 17:23:33 +0200 Subject: [PATCH] Add upgrade --- scripts/upgrade | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index a3f82f3..08c7fb4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -33,13 +33,19 @@ done tmpdir=$(mktemp -dp /tmp/ "${APP}-upgrade-XXXXX") sudo systemctl stop "${SERVICE}" + +install_time=$(sudo yunohost app setting "${APP}" install_time) sudo cp -a "/etc/yunohost/apps/${APP}/settings.yml" "${tmpdir}/" sudo yunohost app remove "${APP}" sudo yunohost app install "https://github.com/${OWNER}/${REPO}" --args "${args_url}" +sudo systemctl stop "${SERVICE}" + sudo cp -a "${tmpdir}/settings.yml" "/etc/yunohost/apps/${APP}/" -sudo systemctl restart "${SERVICE}" +sudo yunohost app setting "${APP}" install_time -v "${install_time}" + +sudo systemctl start "${SERVICE}" sudo rm -r "${tmpdir}/"