mirror of
https://github.com/YunoHost-Apps/lufi_ynh.git
synced 2024-09-03 19:36:28 +02:00
fix
This commit is contained in:
parent
bbbc3a56f1
commit
2ddb91fb5b
5 changed files with 22 additions and 24 deletions
14
config_panel.toml
Normal file
14
config_panel.toml
Normal file
|
@ -0,0 +1,14 @@
|
|||
version = "1.0"
|
||||
|
||||
[main]
|
||||
name = "Lufi configuration"
|
||||
services = ["__APP__"]
|
||||
|
||||
[main.config]
|
||||
name = "Configuration Options"
|
||||
|
||||
[main.config.max_file_size]
|
||||
ask = "Max file size"
|
||||
type = "number"
|
||||
help = "Choose the maximum file size allowed to send, in Mo (0 = no limit)"
|
||||
bind = "max_file_size:/var/www/__APP__/lufi.conf"
|
|
@ -2,8 +2,8 @@ packaging_format = 2
|
|||
|
||||
id = "lufi"
|
||||
name = "Lufi"
|
||||
description.en = "Self hosting files and sharing anonymous application"
|
||||
description.fr = "Application d'hébergement et de partage de fichiers anonyme"
|
||||
description.en = "Files and sharing anonymous application"
|
||||
description.fr = "Application de partage de fichiers anonyme"
|
||||
|
||||
version = "0.05.21~ynh1"
|
||||
|
||||
|
@ -20,7 +20,7 @@ website = "https://git.framasoft.org/luc/lufi"
|
|||
yunohost = ">= 11.1.17"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
ldap = false
|
||||
ldap = true
|
||||
sso = false
|
||||
disk = "50M"
|
||||
ram.build = "50M"
|
||||
|
@ -38,18 +38,11 @@ ram.runtime = "50M"
|
|||
type = "group"
|
||||
default = "visitors"
|
||||
|
||||
[install.max_file_size]
|
||||
ask.en = "Choose a max file size, in Mo (0 = no limit)"
|
||||
ask.fr = "Choisissez une taille de fichier maximum chemin, en Mo (0 = pas de limite)"
|
||||
type = "string"
|
||||
example = "100"
|
||||
default = "100"
|
||||
|
||||
[install.use_ldap]
|
||||
ask.en = "Install Lufi with LDAP configuration?"
|
||||
ask.fr = "Installer Lufi avec la configuration LDAP ?"
|
||||
help.en = "A Lufi with LDAP enabled will allow only YunoHost users to upload."
|
||||
help.fr = "Un Lufi avec LDAP activé autorisera seulement les utilisateurs YunoHost à téléverser."
|
||||
help.en = "Lufi with LDAP enabled will allow only YunoHost users to upload."
|
||||
help.fr = "Lufi avec LDAP activé autorisera seulement les utilisateurs YunoHost à téléverser."
|
||||
type = "boolean"
|
||||
default = false
|
||||
|
||||
|
|
|
@ -13,15 +13,8 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
|
||||
secret=$(ynh_string_random --length=24)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
|
||||
# Check if max_file_size is a number
|
||||
if ! [[ $max_file_size =~ "^[\-0-9]+$" ]] && [ $max_file_size -lt 0 ]; then
|
||||
ynh_die --message="Max file must be a number positive or zero"
|
||||
fi
|
||||
max_file_size= "100"
|
||||
use_ldap=$YNH_APP_ARG_USE_LDAP
|
||||
|
||||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
|
|
|
@ -29,8 +29,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="$install_dir/
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
|
||||
|
||||
if [ -z "$max_file_size" ]; then
|
||||
if [ -z "${max_file_size:-}" ]; then
|
||||
max_file_size=100 # 100 Mo
|
||||
ynh_app_setting_set --app=$app --key=max_file_size --value=$max_file_size
|
||||
fi
|
||||
|
|
|
@ -6,5 +6,4 @@ test_format = 1.0
|
|||
# Default args to use for install
|
||||
# -------------------------------
|
||||
|
||||
args.max_file_size=100
|
||||
args.use_ldap=0
|
||||
|
|
Loading…
Add table
Reference in a new issue