mirror of
https://github.com/YunoHost-Apps/wemawema_ynh.git
synced 2024-10-01 13:34:56 +02:00
commit
d270ee9dd8
4 changed files with 11 additions and 29 deletions
|
@ -1,7 +1,7 @@
|
|||
# WemaWema pour YunoHost
|
||||
|
||||
[![Integration level](https://dash.yunohost.org/integration/wemawema.svg)](https://dash.yunohost.org/appci/app/wemawema) ![](https://ci-apps.yunohost.org/ci/badges/wemawema.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/wemawema.maintain.svg)
|
||||
[![Installer WemaWema avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=wemawema)
|
||||
[![Installer WemaWema avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wemawema)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"url": "https://fiat-tux.fr"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">> 3.8.1"
|
||||
"yunohost": ">> 4.1.7"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
@ -26,29 +26,17 @@
|
|||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"ask": {
|
||||
"en": "Choose a domain name for WemaWema",
|
||||
"fr": "Choisissez un nom de domaine pour WemaWema"
|
||||
},
|
||||
"example": "domain.org"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"type": "path",
|
||||
"ask": {
|
||||
"en": "Choose a path for WemaWema",
|
||||
"fr": "Choisissez un chemin pour WemaWema"
|
||||
},
|
||||
"example": "/wemawema",
|
||||
"default": "/wemawema"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Is it a public application?",
|
||||
"fr": "Est-ce une application publique ?"
|
||||
},
|
||||
"help": {
|
||||
"en": "If enabled, WemaWema will be accessible by people who do not have an account. This can be changed later via the webadmin.",
|
||||
"fr": "Si cette case est cochée, WemaWema sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
|
||||
|
|
|
@ -44,7 +44,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
|
|||
|
||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
|
@ -77,14 +76,12 @@ chown -R www-data: $final_path
|
|||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring SSOwat..." --weight=2
|
||||
ynh_script_progression --message="Configuring permissions..." --weight=2
|
||||
|
||||
# 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"
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
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)
|
||||
|
||||
#=================================================
|
||||
|
@ -32,21 +31,19 @@ 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 is_public 1
|
||||
is_public=1
|
||||
elif [ "$is_public" = "No" ]; then
|
||||
ynh_app_setting_set $app is_public 0
|
||||
is_public=0
|
||||
fi
|
||||
|
||||
# If final_path doesn't exist, create it
|
||||
if [ -z $final_path ]; then
|
||||
final_path=/var/www/$app
|
||||
ynh_app_setting_set $app final_path $final_path
|
||||
fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
||||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue