mirror of
https://github.com/YunoHost-Apps/noalyss_ynh.git
synced 2024-09-03 19:46:20 +02:00
create scripts
- create upgrade scripts - update version on instal script add some values on manifest
This commit is contained in:
parent
3a905a4a87
commit
073f2ee2be
3 changed files with 39 additions and 3 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
32
scripts/upgrade
Normal file
32
scripts/upgrade
Normal file
|
@ -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
|
Loading…
Reference in a new issue