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:
commit
0a473c3f0f
2 changed files with 14 additions and 2 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue