diff --git a/conf/config.local.php b/conf/config.local.php index 5d9833f..038428c 100644 --- a/conf/config.local.php +++ b/conf/config.local.php @@ -62,7 +62,7 @@ $cfg['preview'] = true; /* Enable the encryption feature * By enabling it, file-level deduplication won't work anymore. See FAQ. */ -$cfg['enable_crypt'] = false; +$cfg['enable_crypt'] = __ENABLE_CRYPT__; /* Length of link reference */ diff --git a/config_panel.toml b/config_panel.toml index 76063aa..165603d 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -3,6 +3,17 @@ version = "1.0" [main] name = "Jirafeau configuration" + [main.encrypt] + name = "Encryption feature" + + [main.encrypt.enable_crypt] + ask = "Enable the encryption feature" + type = "boolean" + yes = true + no = false + help = "By enabling encryption feature, file-level deduplication won't work anymore." + bind = "ENABLE_CRYPT:__INSTALL_DIR__/lib/config.local.php" + [main.php_fpm_config] name = "PHP-FPM configuration" diff --git a/doc/ADMIN.md b/doc/ADMIN.md index e05b4dc..ae32d51 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,9 +1,7 @@ -## Configuration - ### Changing the conditions of use of the service The license text on the "Terms of Service" page, which is shipped with the default installation, is "based on the Open Source Initiative Terms of Service". To change this text simply copy the file `/lib/tos.original.txt`, rename it to `/lib/tos.local.txt` and adapt it to your own needs. If you update the installation, then only the `tos.original.txt` file may change eventually, not your `tos.local.txt file`. -## Administration +### Administration To administer the files within Jirafeau it is enough to go to the address `__DOMAIN__/admin.php`. \ No newline at end of file diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 69070fb..29e7548 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -1,9 +1,7 @@ -## Configuration - ### Changer les conditions d'utilisation du service Le texte de la licence sur la page "Conditions d'utilisation du service", qui est livrée avec l'installation par défaut, est basé sur les "Conditions d'utilisation du service de l'Initiative Open Source". Pour modifier ce texte, il suffit de copier le fichier `/lib/tos.original.txt`, de le renommer en `/lib/tos.local.txt` et de l'adapter à vos propres besoins. Si vous mettez à jour l'installation, alors seul le fichier `tos.original.txt` peut changer éventuellement, et non votre fichier `tos.local.txt`. -## Administration +### Administration Pour administrer les fichiers présents au sein de Jirafeau il suffit de se rendre à l'adresse `__DOMAIN__/admin.php`. \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index 12c8f01..5371920 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,7 +16,7 @@ demo = "https://demo.yunohost.org/jirafeau/" code = "https://gitlab.com/mojo42/Jirafeau" [integration] -yunohost = ">= 11.1.16" +yunohost = ">= 11.1.17" architectures = "all" multi_instance = false ldap = false diff --git a/scripts/install b/scripts/install index a128137..5b23b68 100755 --- a/scripts/install +++ b/scripts/install @@ -13,6 +13,8 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= +enable_crypt="false" + fpm_footprint="low" fpm_free_footprint=0 fpm_usage="low" @@ -21,6 +23,7 @@ fpm_usage="low" # STORE SETTINGS FROM MANIFEST #================================================= +ynh_app_setting_set --app=$app --key=enable_crypt --value=$enable_crypt ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage diff --git a/scripts/upgrade b/scripts/upgrade index ce0cdae..854cc85 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,6 +22,12 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +# If enable_crypt doesn't exist, create it +if [ -z "${enable_crypt:-}" ]; then + enable_crypt=false + ynh_app_setting_set --app=$app --key=enable_crypt --value=$enable_crypt +fi + # If fpm_footprint doesn't exist, create it if [ -z "${fpm_footprint:-}" ]; then fpm_footprint=low