mirror of
https://github.com/YunoHost-Apps/lufi_ynh.git
synced 2024-09-03 19:36:28 +02:00
Update .fonctions
This commit is contained in:
parent
e49460ed41
commit
6835d7c7f5
1 changed files with 12 additions and 0 deletions
|
@ -202,3 +202,15 @@ BACKUP_BEFORE_UPGRADE () { # Backup the current version of the app, restore it i
|
|||
ynh_die "Backup failed, the upgrade process was aborted."
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Exit if an error occurs during the execution of the script.
|
||||
#
|
||||
# Stop immediatly the execution if an error occured or if a empty variable is used.
|
||||
# The execution of the script is derivate to ynh_exit_properly function before exit.
|
||||
#
|
||||
# Usage: ynh_abort_if_errors
|
||||
ynh_abort_if_errors () {
|
||||
set -eu # Exit if a command fail, and if a variable is used unset.
|
||||
trap ynh_exit_properly EXIT # Capturing exit signals on shell script
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue