1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/h5ai_ynh.git synced 2024-09-03 20:36:25 +02:00

cleaning up

This commit is contained in:
ericgaspar 2021-03-15 11:15:09 +01:00
parent 064d55b4a9
commit 4bea314c04
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 1 additions and 26 deletions

View file

@ -14,7 +14,7 @@
"email": "alex.aubin@mailoo.org"
},
"requirements": {
"yunohost": ">= 4.0.0"
"yunohost": ">= 4.1.7"
},
"multi_instance": false,
"services": [
@ -26,29 +26,17 @@
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain for h5ai",
"fr": "Choisissez un domaine pour h5ai"
},
"example": "domain.org"
},
{
"name": "path",
"type": "path",
"ask": {
"en": "Choose a path for h5ai",
"fr": "Choisissez un chemin pour h5ai"
},
"example": "/documents",
"default": "/documents"
},
{
"name": "is_public",
"type": "boolean",
"ask": {
"en": "Is it a public application?",
"fr": "Est-ce une application publique ?"
},
"default": true
}
]

View file

@ -49,7 +49,6 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder"
#=================================================
ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
#=================================================
@ -93,8 +92,6 @@ ynh_script_progression --message="Configuring permissions..." --weight=1
# Make app public if necessary or protect it
if [ $is_public -eq 1 ]
then
# Everyone can access the app.
# The "main" permission is automatically created before the install script.
ynh_permission_update --permission="main" --add="visitors"
fi

View file

@ -23,7 +23,6 @@ else
fi
path_url=$(ynh_app_setting_get --app=$app --key=path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
domain=$(ynh_app_setting_get --app=$app --key=domain)
@ -38,15 +37,6 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Fix is_public as a boolean value
if [ "$is_public" = "Yes" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=1
is_public=1
elif [ "$is_public" = "No" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=0
is_public=0
fi
# If final_path doesn't exist, create it
if [ -z "$final_path" ]; then
final_path=/var/www/$app