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

Use ynh_webpath helper

This commit is contained in:
Jean-Baptiste Holcroft 2017-10-19 12:34:02 +02:00
parent 110967fa73
commit d6de012995
2 changed files with 9 additions and 9 deletions

View file

@ -17,13 +17,14 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
app=$YNH_APP_INSTANCE_NAME
# TODO: Check domain/path availability with app helper
yunohost app checkurl "${domain}${path}" -a "$app" \
|| ynh_die "The path ${domain}${path} is not available for app installation."
# 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"
# Check user parameter
ynh_user_exists "$admin" \
|| ynh_die "The chosen admin user does not exist."
ynh_app_setting_set $app admin_user $admin
# Retrieve admin email

View file

@ -20,9 +20,8 @@ domain=$(ynh_app_setting_get "$app" domain)
path=$(ynh_app_setting_get "$app" path)
dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
# TODO: Check domain/path availability with app helper
yunohost app checkurl "${domain}${path}" -a "$app" \
|| ynh_die "The path ${domain}${path} is not available for app installation."
# Check web path availability
ynh_webpath_available "$domain" "$path_url"
# Check destination directory
DESTDIR="/var/www/$app"