mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
install: modernize checking for domain availability
This commit is contained in:
parent
27e7851dcc
commit
ee502444c6
1 changed files with 8 additions and 6 deletions
|
@ -4,7 +4,7 @@
|
|||
domain=$YNH_APP_ARG_DOMAIN
|
||||
is_public=$YNH_APP_ARG_PUBLIC_SITE
|
||||
analytics=$YNH_APP_ARG_ANALYTICS
|
||||
path=""
|
||||
path_url="/"
|
||||
|
||||
# Source app helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
|
@ -45,11 +45,13 @@ then
|
|||
script_die "Mattermost requires MySQL 5.6 or higher, or MariaDB 10 or higher."
|
||||
fi
|
||||
|
||||
# Check domain availability
|
||||
sudo yunohost app checkurl $domain$path -a mattermost
|
||||
if [[ ! $? -eq 0 ]]; then
|
||||
script_die "The app cannot be installed at '$domain$path': this location is already used."
|
||||
fi
|
||||
# Normalize the url path syntax
|
||||
path_url=$(ynh_normalize_url_path $path_url)
|
||||
# Check web path availability
|
||||
ynh_webpath_available $domain $path_url
|
||||
# Register (book) web path
|
||||
ynh_webpath_register $app $domain $path_url
|
||||
# Store setting
|
||||
ynh_app_setting_set mattermost domain "$domain"
|
||||
|
||||
# Install dependencies
|
||||
|
|
Loading…
Add table
Reference in a new issue