mirror of
https://github.com/YunoHost-Apps/icecoder_ynh.git
synced 2024-09-03 19:26:10 +02:00
Fix sub_folder
This commit is contained in:
parent
63abc6ae54
commit
37ac4a7cf7
4 changed files with 8 additions and 8 deletions
|
@ -3,7 +3,7 @@
|
|||
sudo yunohost app install my_webapp -a "domain=domain.tld&path=/path&with_sftp=1&password=myreallystrengthpassword&is_public=1&phpversion=7.3&with_mysql=1"
|
||||
; Manifest
|
||||
app_id="my_webapp"
|
||||
sub_path="/www"
|
||||
sub_folder="/www"
|
||||
path="/icecoder"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
|
|
|
@ -43,10 +43,10 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"name": "sub_path",
|
||||
"name": "sub_folder",
|
||||
"type": "path",
|
||||
"ask": {
|
||||
"en": "Indicate the name of the final_path subfolder containing the files accessible from your browser ",
|
||||
"en": "Indicate the name of the final_path subfolder containing the files accessible from your browser",
|
||||
"fr": "Indiquer le nom du sous-dossier du final_path contenant les fichiers accessibles depuis votre navigateur"
|
||||
},
|
||||
"help": {
|
||||
|
|
|
@ -21,7 +21,7 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
|
||||
app_id=$YNH_APP_ARG_APP_ID
|
||||
sub_path=$YNH_APP_ARG_SUB_PATH
|
||||
sub_folder=$YNH_APP_ARG_SUB_FOLDER
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -30,8 +30,8 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
#=================================================
|
||||
ynh_script_progression --message="Validating installation parameters..."
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app_id --key=final_path)$sub_path/icecoder
|
||||
test -e "/var/www/$(ynh_app_setting_get --app=$app_id --key=final_path)" || ynh_die --message="You don't have installed $app before installing this app"
|
||||
final_path=$(ynh_app_setting_get --app=$app_id --key=final_path)$sub_folder/icecoder
|
||||
test -e "$(ynh_app_setting_get --app=$app_id --key=final_path)" || ynh_die --message="You don't have installed $app before installing this app"
|
||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||
|
||||
#=================================================
|
||||
|
@ -40,7 +40,7 @@ test ! -e "$final_path" || ynh_die --message="This path already contains a folde
|
|||
ynh_script_progression --message="Storing installation settings..."
|
||||
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=sub_path --value=$sub_path
|
||||
ynh_app_setting_set --app=$app --key=sub_folder --value=$sub_folder
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
|
|
@ -26,7 +26,7 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
app_id=$(ynh_app_setting_get --app=$app --key=app_id)
|
||||
sub_path=$(ynh_app_setting_get --app=$app --key=sub_path)
|
||||
sub_folder=$(ynh_app_setting_get --app=$app --key=sub_folder)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
|
|
Loading…
Reference in a new issue