mirror of
https://github.com/YunoHost-Apps/garradin_ynh.git
synced 2024-09-03 18:36:17 +02:00
try add a file with the new constant and add a call with require in the config.local.php
This commit is contained in:
parent
58e2a40af0
commit
be89f0e280
2 changed files with 55 additions and 1 deletions
51
conf/config.local.release.php
Normal file
51
conf/config.local.release.php
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Activer la possibilité de faire une mise à jour semi-automatisée
|
||||||
|
* depuis fossil.kd2.org.
|
||||||
|
*
|
||||||
|
* Si mis à TRUE, alors un bouton sera accessible depuis le menu "Configuration"
|
||||||
|
* pour faire une mise à jour en deux clics.
|
||||||
|
*
|
||||||
|
* Il est conseillé de désactiver cette fonctionnalité si vous ne voulez pas
|
||||||
|
* permettre à un utilisateur de casser l'installation !
|
||||||
|
*
|
||||||
|
* Défaut : true, ajout pour l'environement Yunohost défaut : false
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
|
||||||
|
const ENABLE_UPGRADES = false
|
||||||
|
|
||||||
|
**
|
||||||
|
* Commande de création de PDF
|
||||||
|
*
|
||||||
|
* Commande qui sera exécutée pour créer un fichier PDF à partir d'un HTML.
|
||||||
|
* Si laissé non spécifié (ou NULL), Garradin essaiera de détecter une solution entre
|
||||||
|
* PrinceXML, Chromium, wkhtmltopdf ou weasyprint.
|
||||||
|
*
|
||||||
|
* %1$s sera remplacé par le chemin du fichier HTML, et %2$s par le chemin du fichier PDF.
|
||||||
|
*
|
||||||
|
* Exemple : chromium --headless --print-to-pdf=%2$s %1$s
|
||||||
|
*
|
||||||
|
* Défaut : null
|
||||||
|
*/
|
||||||
|
//const PDF_COMMAND = 'wkhtmltopdf %2$s %1$s';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clé de licence
|
||||||
|
*
|
||||||
|
* Cette clé permet de débloquer certaines fonctionnalités dans des extensions officielles.
|
||||||
|
*
|
||||||
|
* Pour l'obtenir il faut se créer un compte sur Garradin.eu
|
||||||
|
* et faire une contribution financière.
|
||||||
|
* La clé apparaîtra ensuite en dessous des informations
|
||||||
|
* de l'association dans la page "Mon abonnement Garradin.eu".
|
||||||
|
*
|
||||||
|
* Il faut recopier cette clé dans le fichier config.local.php
|
||||||
|
* dans la constante CONTRIBUTOR_LICENSE.
|
||||||
|
*
|
||||||
|
* Merci de ne pas essayer de contourner cette licence et de contribuer au
|
||||||
|
* financement de notre travail :-)
|
||||||
|
*/
|
||||||
|
//const CONTRIBUTOR_LICENSE = 'XXXXX';
|
|
@ -255,7 +255,9 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding a configuration file..." --weight=5
|
ynh_script_progression --message="Adding a configuration file..." --weight=5
|
||||||
|
|
||||||
echo -e "\n /** \n * Activer la possibilité de faire une mise à jour semi-automatisée \n * depuis fossil.kd2.org. \n * \n * Si mis à TRUE, alors un bouton sera accessible depuis le menu "Configuration" \n * pour faire une mise à jour en deux clics. \n * \n * Il est conseillé de désactiver cette fonctionnalité si vous ne voulez pas \n * permettre à un utilisateur de casser l'installation ! \n * \n * Défaut : true \n * \n * @var bool \n */ \n \nconst ENABLE_UPGRADES = false;" >> $final_path/config.local.php
|
ynh_add_config --template="config.local.release.php" --destination="$final_path/config.local.release.php"
|
||||||
|
|
||||||
|
echo -e "\n require 'config.local.release.php'" >> $final_path/config.local.php
|
||||||
|
|
||||||
# Permissions on files and directories
|
# Permissions on files and directories
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
|
@ -265,6 +267,7 @@ find "$final_path" -type f -exec chmod 440 {} +
|
||||||
find "$final_path/data" -type d -exec chmod 770 {} +
|
find "$final_path/data" -type d -exec chmod 770 {} +
|
||||||
find "$final_path/data" -type f -exec chmod 660 {} +
|
find "$final_path/data" -type f -exec chmod 660 {} +
|
||||||
chmod 660 "$final_path/config.local.php"
|
chmod 660 "$final_path/config.local.php"
|
||||||
|
chmod 660 "$final_path/config.local.release.php"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Add table
Reference in a new issue