mirror of
https://github.com/YunoHost-Apps/ffsync_ynh.git
synced 2024-09-03 18:26:38 +02:00
Store settings before to test the install
This commit is contained in:
parent
14e1be1819
commit
03944ddd47
1 changed files with 12 additions and 12 deletions
|
@ -25,23 +25,11 @@ domain=$YNH_APP_ARG_DOMAIN
|
|||
path_url=$YNH_APP_ARG_PATH
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
|
||||
# Check destination directory
|
||||
final_path="/opt/yunohost/$app"
|
||||
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
||||
|
||||
# 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 SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
|
@ -50,6 +38,18 @@ ynh_app_setting_set "$app" domain "$domain"
|
|||
ynh_app_setting_set "$app" path "$path_url"
|
||||
ynh_app_setting_set "$app" final_path "$final_path"
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
|
||||
# Check destination directory
|
||||
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
||||
|
||||
# Check web path availability
|
||||
ynh_webpath_available "$domain" "$path_url"
|
||||
# Register (book) web path
|
||||
ynh_webpath_register "$app" "$domain" "$path_url"
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue