mirror of
https://github.com/YunoHost-Apps/shellinabox_ynh.git
synced 2024-09-03 20:26:12 +02:00
Add ynh_abort_if_errors
This commit is contained in:
parent
d5170e1e6a
commit
944c8f73d4
3 changed files with 22 additions and 20 deletions
|
@ -6,7 +6,7 @@
|
|||
"en": "Web based AJAX terminal emulator",
|
||||
"fr": "Émulateur de terminal web"
|
||||
},
|
||||
"version": "2.21~ynh1",
|
||||
"version": "2.21~ynh2",
|
||||
"url": "https://github.com/shellinabox/shellinabox",
|
||||
"license": "GPL-2.0",
|
||||
"maintainer": {
|
||||
|
@ -14,7 +14,7 @@
|
|||
"email": "kload@kload.fr"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 3.8.1"
|
||||
"yunohost": ">= 4.1.7"
|
||||
},
|
||||
"multi_instance": false,
|
||||
"services": [
|
||||
|
@ -25,19 +25,11 @@
|
|||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"ask": {
|
||||
"en": "Choose a domain for Shell In A Box",
|
||||
"fr": "Choisissez un nom de domaine pour Shell In A Box"
|
||||
},
|
||||
"example": "domain.org"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"type": "path",
|
||||
"ask": {
|
||||
"en": "Choose a path for Shell In A Box",
|
||||
"fr": "Choisissez un chemin pour Shell In A Box"
|
||||
},
|
||||
"example": "/ssh",
|
||||
"default": "/ssh"
|
||||
}
|
||||
|
|
|
@ -11,14 +11,6 @@
|
|||
- [ ] Upgrade from last version tested.
|
||||
- [ ] Can be reviewed and tested.
|
||||
|
||||
## Validation
|
||||
## Package_check results
|
||||
---
|
||||
*Minor decision*
|
||||
- **Upgrade previous version** :
|
||||
- [ ] **Code review** :
|
||||
- [ ] **Approval (LGTM)** :
|
||||
- [ ] **Approval (LGTM)** :
|
||||
- **CI succeeded** :
|
||||
[![Build Status](https://ci-apps-hq.yunohost.org/jenkins/job/shellinabox_ynh%20PR-NUM-/badge/icon)](https://ci-apps-hq.yunohost.org/jenkins/job/shellinabox_ynh%20PR-NUM-/)
|
||||
*Please replace '-NUM-' in this link by the PR number.*
|
||||
When the PR is marked as ready to merge, you have to wait for 3 days before really merging it.
|
||||
* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"*
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
@ -29,6 +30,23 @@ ynh_script_progression --message="Loading installation settings..."
|
|||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --time --weight=1
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
|
||||
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||
|
||||
# Restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# CHECK WHICH PARTS SHOULD BE CHANGED
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue