1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jirafeau_ynh.git synced 2024-09-03 19:35:53 +02:00

add crypt (#106)

* add crypt

* Update manifest.toml

* Update install

* cleaning
This commit is contained in:
Éric Gaspar 2023-07-28 07:46:15 +01:00 committed by GitHub
parent 48fd362ace
commit 7166dba946
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 24 additions and 8 deletions

View file

@ -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
*/

View file

@ -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"

View file

@ -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`.

View file

@ -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`.

View file

@ -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

View file

@ -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

View file

@ -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