From 073f2ee2be68749f66451ee26f38dd81262868d5 Mon Sep 17 00:00:00 2001 From: dudjima <36198494+dudjima@users.noreply.github.com> Date: Fri, 13 Apr 2018 21:20:12 +0200 Subject: [PATCH] create scripts - create upgrade scripts - update version on instal script add some values on manifest --- manifest.json | 8 ++++++-- scripts/install | 2 +- scripts/upgrade | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 scripts/upgrade diff --git a/manifest.json b/manifest.json index d8af73c..7eccbc7 100644 --- a/manifest.json +++ b/manifest.json @@ -5,6 +5,7 @@ "en": "Accounting free software (Beligum and French accounting)", "fr": "Logiciel libre de comptabilité (comptabilité Belge et Française)" }, + "url": "http://www.noalyss.eu/", "license": "GPL-2", "maintainer": { "name": "bram", @@ -17,14 +18,17 @@ { "name": "domain", "ask": { - "en": "Choose a domain for NOALYSS" + "en": "Choose a domain for NOALYSS", + "fr": "Choisir un domaine pour NOALYSS" }, "example": "domain.org" }, { "name": "path", + "type": "path", "ask": { - "en": "Choose a path for NOALYSS" + "en": "Choose a path for NOALYSS", + "fr": "Choisir un chemin pour NOALYSS" }, "example": "/compta", "default": "/compta" diff --git a/scripts/install b/scripts/install index 0905aeb..28b81f1 100644 --- a/scripts/install +++ b/scripts/install @@ -21,7 +21,7 @@ sudo cp -a ../sources/include/ $final_path sudo chown -R www-data: $final_path -sudo yunohost app setting noalyss version -v "6.9.0.0" +sudo yunohost app setting noalyss version -v "7.0.1.0" if [[ "$path" == "" ]]; then sed -i "s@PATHTOCHANGE@/@g" ../conf/nginx.conf diff --git a/scripts/upgrade b/scripts/upgrade new file mode 100644 index 0000000..02249e4 --- /dev/null +++ b/scripts/upgrade @@ -0,0 +1,32 @@ +#!/bin/bash + +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source _common.sh +source /usr/share/yunohost/helpers + +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= + +ynh_backup_before_upgrade +ynh_clean_setup () { + ynh_restore_upgradebackup +} +ynh_abort_if_errors + +sudo -i -u postgres + +pg_dumpall > noalyss_backup.dmp + +sudo cp -a noalyss/include/config.inc.php etc/tmp/ + +#================================================= +# RELOAD NGINX +#================================================= + +systemctl reload nginx