1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/baikal_ynh.git synced 2024-09-03 18:16:11 +02:00

Merge pull request #34 from YunoHost-Apps/well-known

Handle well-known conflict
This commit is contained in:
Maniack Crudelis 2019-05-10 11:50:47 +02:00 committed by GitHub
commit 0a473c3f0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View file

@ -6,7 +6,7 @@
# IMPORT GENERIC HELPERS
#=================================================
#source ./_common.sh
source ./_common.sh
source /usr/share/yunohost/helpers
#=================================================
@ -37,6 +37,12 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder"
# Register (book) web path
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
# Check if .well-known is available for this domain.
if is_url_handled "https://$domain/.well-known/caldav" || is_url_handled "https://$domain/.well-known/carddav"
then
ynh_die --message="Another app already uses the domain $domain to serve a caldav/carddav feature. Please use another domain."
fi
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================

View file

@ -6,7 +6,7 @@
# IMPORT GENERIC HELPERS
#=================================================
# source ../settings/scripts/_common.sh
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
@ -38,6 +38,12 @@ ynh_webpath_available --domain=$domain --path_url=$path_url \
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
# Check if .well-known is available for this domain.
if is_url_handled "https://$domain/.well-known/caldav" || is_url_handled "https://$domain/.well-known/carddav"
then
ynh_die --message="Another app already uses the domain $domain to serve a caldav/carddav feature. Please use another domain."
fi
#=================================================
# STANDARD RESTORATION STEPS
#=================================================