1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/paheko_ynh.git synced 2024-09-03 19:56:22 +02:00

back to precedent commit !

This commit is contained in:
rodinux 2024-01-01 21:54:53 +01:00
parent 678cdaddd3
commit 7853298645
5 changed files with 25 additions and 19 deletions

View file

@ -1,3 +1,11 @@
If you wish, you can add custom configurations inside `__INSTALL_DIR__/config.local.php`. If you wish, you can add custom configurations inside `__DATA_DIR__/data/config.local.user.php`.
Use the `__DATA-DIR__/data` folder if you want to store documents elsewhere than in the database. Example in `__DATA_DIR__/data/config.local.user.php` file
```
const FILE_STORAGE_BACKEND = 'FileSystem';
const FILE_STORAGE_CONFIG = DATA_ROOT . /files';
```
**Important**: for some reason, email does not work when installing on a subpath. You are encouraged to use a full, dedicated for this domain (with path set to /) **Important**: for some reason, email does not work when installing on a subpath. You are encouraged to use a full, dedicated for this domain (with path set to /)

View file

@ -1,4 +1,12 @@
Vous pouvez si vous le souhaitez ajouter des configurations personnelles en éditant le fichier `__INSTALL_DIR__/config.local.php`. Vous pouvez si vous le souhaitez ajouter des configurations personnelles en éditant le fichier `__DATA_DIR__/data/config.local.user.php`.
Privilégiez le dossier `__DATA-DIR__/data` si vous voulez conserver des documents ailleurs que dans la base de données. Example dans le fichier `__DATA_DIR__/data/config.local.user.php`
```
const FILE_STORAGE_BACKEND = 'FileSystem';
const FILE_STORAGE_CONFIG = DATA_ROOT . '/files';
```
**Important** : Pour une raison quelconque, le courriel ne fonctionne pas lors de linstallation sur une sous-instance. Nous vous encourageons à utiliser un nom de domaine complet dédié à ce domaine (avec le chemin défini sur /). **Important** : Pour une raison quelconque, le courriel ne fonctionne pas lors de linstallation sur une sous-instance. Nous vous encourageons à utiliser un nom de domaine complet dédié à ce domaine (avec le chemin défini sur /).

View file

@ -20,9 +20,8 @@ ynh_script_progression --message="Setting up source files..." --weight=4
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
chmod -R u=rX,g=X,o= "$install_dir"
chmod -R u=rX,g=rX,o= "$install_dir/www"
#================================================= #=================================================
# SYSTEM CONFIGURATION # SYSTEM CONFIGURATION
@ -52,9 +51,6 @@ ynh_add_config --template="config.local.php" --destination="$install_dir/config.
chmod 650 "$install_dir/config.local.php" chmod 650 "$install_dir/config.local.php"
chown $app:$app "$install_dir/config.local.php" chown $app:$app "$install_dir/config.local.php"
chown -R $app:www-data "$data_dir/"
chmod -R u=rwX,g=,o= "$data_dir/"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================

View file

@ -17,9 +17,8 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$install_dir" ynh_restore_file --origin_path="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
chmod -R u=rX,g=X,o= "$install_dir"
chmod -R u=rX,g=rX,o= "$install_dir/www"
#================================================= #=================================================
# RESTORE THE DATA DIRECTORY # RESTORE THE DATA DIRECTORY
@ -28,9 +27,6 @@ ynh_script_progression --message="Restoring the data directory..." --weight=1
ynh_restore_file --origin_path="$data_dir" --not_mandatory ynh_restore_file --origin_path="$data_dir" --not_mandatory
chown -R $app:www-data "$data_dir/"
chmod -R u=rwX,g=,o= "$data_dir/"
#================================================= #=================================================
# RESTORE SYSTEM CONFIGURATIONS # RESTORE SYSTEM CONFIGURATIONS
#================================================= #=================================================

View file

@ -70,8 +70,8 @@ then
ynh_setup_source --dest_dir="$install_dir" --keep="config.local.php data/plugins" ynh_setup_source --dest_dir="$install_dir" --keep="config.local.php data/plugins"
fi fi
chmod 650 "$install_dir/config.local.php" chmod -R o-rwx "$install_dir"
chown $app:$app "$install_dir/config.local.php" chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# REAPPLY SYSTEM CONFIGURATIONS # REAPPLY SYSTEM CONFIGURATIONS
@ -103,8 +103,6 @@ chown $app:$app "$install_dir/config.local.php"
ynh_replace_string --match_string="//require '$data_dir/data/config.local.user.php';" --replace_string="require '$data_dir/data/config.local.user.php';" --target_file="$install_dir/config.local.php" ynh_replace_string --match_string="//require '$data_dir/data/config.local.user.php';" --replace_string="require '$data_dir/data/config.local.user.php';" --target_file="$install_dir/config.local.php"
chmod -R u=rX,g=X,o= "$install_dir"
chmod -R u=rX,g=rX,o= "$install_dir/www"
#================================================= #=================================================
# ADD A CONFIG FILE # ADD A CONFIG FILE
#================================================= #=================================================
@ -112,11 +110,11 @@ chmod -R u=rX,g=rX,o= "$install_dir/www"
if [ ! -d "$data_dir/data" ]; then if [ ! -d "$data_dir/data" ]; then
ynh_script_progression --message="Adding a configuration directory..." --weight=5 ynh_script_progression --message="Adding a configuration directory..." --weight=5
mkdir "$data_dir/data" mkdir "$data_dir/data"
chmod 770 "$data_dir/data"
chown -R $app:www-data "$data_dir/data" chown -R $app:www-data "$data_dir/data"
chmod -R u=rwX,g=,o= "$data_dir/data"
else else
chown -R $app:www-data "$data_dir/data" chown -R $app:www-data "$data_dir/data/cache"
chmod -R u=rwX,g=,o= "$data_dir/data" chown $app:www-data "$data_dir/data/index.html"
fi fi
if [ ! -f "$data_dir/data/config.local.user.php" ]; then if [ ! -f "$data_dir/data/config.local.user.php" ]; then