mirror of
https://github.com/YunoHost-Apps/paheko_ynh.git
synced 2024-09-03 19:56:22 +02:00
add a configuration file on
This commit is contained in:
parent
672490dc19
commit
31116a81cc
4 changed files with 33 additions and 3 deletions
|
@ -6,8 +6,9 @@
|
|||
*
|
||||
* NE PAS MODIFIER LES VALEURS PRÉSENTES DÉCOMMENTÉES DANS CE FICHIER!
|
||||
*
|
||||
* Pour ajouter des configurations personneles à Paheko, lisez-les battentivement dans ce fichier,
|
||||
* puis décommentez et modifiez ce dont vous avez besoin.
|
||||
* Pour ajouter des configurations personnelles à votre instance et les garder,
|
||||
* lisez attentivement ce fichier, puis ajoutez les constantes commentées nécessaires
|
||||
* dans le fichier __DATA_DIR__/data/config.local.user.php.
|
||||
*/
|
||||
|
||||
// Nécessaire pour situer les constantes dans le bon namespace
|
||||
|
@ -885,4 +886,8 @@ const MAIL_SENDER = '__APP__@__DOMAIN__';
|
|||
*/
|
||||
//const ALERT_MESSAGE = 'Ceci est un compte de test.';
|
||||
|
||||
/**
|
||||
* Chemin vers le fichier pour des configurations personnelles
|
||||
* qui ne sera pas écraser lors des mises à jour.
|
||||
*/
|
||||
require '__DATA__DIR__/data/config.local.user.php';
|
||||
|
|
11
conf/config.local.user.php
Normal file
11
conf/config.local.user.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Ce fichier est ici pour ajouter des personnalisations à votre configuration.
|
||||
*
|
||||
* Modifiez ce fichier à votre guise, excepté les constantes déjà présentes dans le fichier
|
||||
* __INSTALL__DIR__/config.local.php, il ne sera pas modifié lors des prochaines mises à jour.
|
||||
* Consultez le fichier __INSTALL_DIR__/config.local.php pour disposer des constantes commentées
|
||||
* que vous voudriez éventuellemnt ajouter.
|
||||
*/
|
||||
|
||||
// Nécessaire pour situer les constantes dans le bon namespace
|
||||
namespace Paheko;
|
|
@ -51,6 +51,11 @@ ynh_add_config --template="config.local.php" --destination="$install_dir/config.
|
|||
chmod 650 "$install_dir/config.local.php"
|
||||
chown $app:$app "$install_dir/config.local.php"
|
||||
|
||||
ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php"
|
||||
|
||||
chmod 650 "$data_dir/data/config.local.user.php"
|
||||
chown $app:$app "$data_dir/data/config.local.user.php"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -66,12 +66,21 @@ chmod 644 "/etc/cron.d/$app"
|
|||
if ynh_compare_current_package_version --comparison lt --version 1.3.1~ynh1
|
||||
then
|
||||
ynh_script_progression --message="Updating a configuration file..." --weight=5
|
||||
|
||||
|
||||
ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php"
|
||||
chmod 650 "$install_dir/config.local.php"
|
||||
chown $app:$app "$install_dir/config.local.php"
|
||||
fi
|
||||
|
||||
if [ ! -f "${data_dir}/data/config.local.user.php" ]; then
|
||||
ynh_script_progression --message="Updating a configuration file..." --weight=5
|
||||
|
||||
ynh_add_config --template="config.local.user.php" --destination="$data_dir/config.local.php"
|
||||
chmod 650 "$data_dir/config.local.php"
|
||||
chown $app:$app "$data_dir/config.local.php"
|
||||
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue