1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dolibarr_ynh.git synced 2024-09-03 18:35:53 +02:00

Restored path_url and changed final_url format

This commit is contained in:
Olivier BILHAUT 2018-01-29 17:23:33 +01:00 committed by Jeff
parent d45a3d08ca
commit 363bfc24cd

View file

@ -30,7 +30,7 @@ ynh_abort_if_errors
# Retrieve arguments # Retrieve arguments
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
pathurl=$YNH_APP_ARG_PATH path_url=$YNH_APP_ARG_PATH
#path=$YNH_APP_ARG_PATH #path=$YNH_APP_ARG_PATH
admin=$YNH_APP_ARG_ADMIN admin=$YNH_APP_ARG_ADMIN
member=$YNH_APP_ARG_MEMBER member=$YNH_APP_ARG_MEMBER
@ -39,16 +39,20 @@ ynh_abort_if_errors
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#================================================= #=================================================
# First test base directory
final_path=/var/www/$app final_path=/var/www/$app
test ! -e "$final_path" || ynh_die "This path already contains a folder" test ! -e "$final_path" || ynh_die "This path already contains a folder"
# Then adjust to dolibarr specificity (app is in htdocs sub-directory)
final_path=/var/www/$app/htdocs/
# Normalize the url path syntax # Normalize the url path syntax
pathurl=$(ynh_normalize_url_path $pathurl) path_url=$(ynh_normalize_url_path $path_url)
# Check web path availability # Check web path availability
ynh_webpath_available $domain $pathurl ynh_webpath_available $domain $path_url
# Register (book) web path # Register (book) web path
ynh_webpath_register $app $domain $pathurl ynh_webpath_register $app $domain $path_url
# Correct path: puts a / at the start and nothing at the end # Correct path: puts a / at the start and nothing at the end