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",
|
"en": "Web based AJAX terminal emulator",
|
||||||
"fr": "Émulateur de terminal web"
|
"fr": "Émulateur de terminal web"
|
||||||
},
|
},
|
||||||
"version": "2.21~ynh1",
|
"version": "2.21~ynh2",
|
||||||
"url": "https://github.com/shellinabox/shellinabox",
|
"url": "https://github.com/shellinabox/shellinabox",
|
||||||
"license": "GPL-2.0",
|
"license": "GPL-2.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
"email": "kload@kload.fr"
|
"email": "kload@kload.fr"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 3.8.1"
|
"yunohost": ">= 4.1.7"
|
||||||
},
|
},
|
||||||
"multi_instance": false,
|
"multi_instance": false,
|
||||||
"services": [
|
"services": [
|
||||||
|
@ -25,19 +25,11 @@
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "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"
|
"example": "domain.org"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"ask": {
|
|
||||||
"en": "Choose a path for Shell In A Box",
|
|
||||||
"fr": "Choisissez un chemin pour Shell In A Box"
|
|
||||||
},
|
|
||||||
"example": "/ssh",
|
"example": "/ssh",
|
||||||
"default": "/ssh"
|
"default": "/ssh"
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,14 +11,6 @@
|
||||||
- [ ] Upgrade from last version tested.
|
- [ ] Upgrade from last version tested.
|
||||||
- [ ] Can be reviewed and tested.
|
- [ ] Can be reviewed and tested.
|
||||||
|
|
||||||
## Validation
|
## Package_check results
|
||||||
---
|
---
|
||||||
*Minor decision*
|
* 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!"*
|
||||||
- **Upgrade previous version** :
|
|
||||||
- [ ] **Code review** :
|
|
||||||
- [ ] **Approval (LGTM)** :
|
|
||||||
- [ ] **Approval (LGTM)** :
|
|
||||||
- **CI succeeded** :
|
|
||||||
[](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.
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
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)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
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
|
# CHECK WHICH PARTS SHOULD BE CHANGED
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue