1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mattermost_ynh.git synced 2024-09-03 19:36:29 +02:00

scripts: use ynh_abort_if_errors helper

This commit is contained in:
Pierre de La Morinerie 2017-10-10 16:30:33 +05:30
parent 0685617e8f
commit ebaea2dbda
4 changed files with 20 additions and 4 deletions

View file

@ -1,5 +1,4 @@
#!/bin/bash
set -eu # exit on error ; treat unset variables as error
#=================================================
# IMPORT GENERIC HELPERS
@ -7,6 +6,13 @@ set -eu # exit on error ; treat unset variables as error
source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================

View file

@ -1,5 +1,4 @@
#!/bin/bash
set -eu # exit on error ; treat unset variables as error
# Retrieve arguments
domain=$YNH_APP_ARG_DOMAIN
@ -10,6 +9,9 @@ path=""
# Source app helpers
source /usr/share/yunohost/helpers
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
# Set up common variables
root_path="$(pwd)/.."
final_path=/var/www/mattermost

View file

@ -1,5 +1,4 @@
#!/bin/bash
set -eu # exit on error ; treat unset variables as error
#=================================================
# IMPORT GENERIC HELPERS
@ -7,6 +6,13 @@ set -eu # exit on error ; treat unset variables as error
source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================

View file

@ -1,9 +1,11 @@
#!/bin/bash
set -eu # exit on error ; treat unset variables as error
# Source app helpers
source /usr/share/yunohost/helpers
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
# Retrieve arguments
domain=$(ynh_app_setting_get mattermost domain)
is_public=$(ynh_app_setting_get mattermost is_public)