Installer le logo dans YunoHost

This commit is contained in:
Alexandre NOEL 2026-09-03 22:38:44 +02:00
commit 64df888eaa
6 changed files with 9 additions and 1 deletions

View file

@ -5,7 +5,7 @@ id = "globinours"
name = "Globinours"
description.en = "Lightweight animal shelter management"
description.fr = "Gestion légère et complète pour refuges animaliers"
version = "1.0.0-rc.3~ynh1"
version = "1.0.0-rc.3~ynh2"
maintainers = ["OverSu"]
[upstream]

View file

@ -3,6 +3,10 @@ source /usr/share/yunohost/helpers
php_upload_max_filesize="250M"
install_yunohost_logo() {
install -D -m 0644 "$YNH_APP_BASEDIR/logo.png" "/usr/share/yunohost/applogos/$app.png"
}
prepare_persistent_paths() {
mkdir -p "$data_dir/association" "$data_dir/grants" "$data_dir/medical-documents" \
"$data_dir/private-media" "$data_dir/media" "$data_dir/storage/logs" \

View file

@ -3,6 +3,7 @@ source _common.sh
ynh_script_progression --message="Installation de Globinours..."
ynh_setup_source --dest_dir="$install_dir"
prepare_persistent_paths
install_yunohost_logo
ynh_config_add_phpfpm
ynh_config_add_nginx
ynh_exec_as_app php "$install_dir/scripts/migrate.php"

View file

@ -1,4 +1,5 @@
#!/bin/bash
source _common.sh
ynh_safe_rm "/usr/share/yunohost/applogos/$app.png"
ynh_config_remove_nginx
ynh_config_remove_phpfpm

View file

@ -5,6 +5,7 @@ ynh_restore "$data_dir"
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf"
prepare_persistent_paths
install_yunohost_logo
ynh_exec_as_app php "$install_dir/scripts/migrate.php"
ynh_systemctl --service="php$php_version-fpm" --action=reload
ynh_systemctl --service=nginx --action=reload

View file

@ -7,6 +7,7 @@ touch "$data_dir/storage/maintenance.flag"
trap 'rm -f "$data_dir/storage/maintenance.flag"' EXIT
ynh_setup_source --dest_dir="$install_dir" --full_replace --keep="data storage public/media"
prepare_persistent_paths
install_yunohost_logo
ynh_config_add_phpfpm
ynh_config_add_nginx
ynh_exec_as_app php "$install_dir/scripts/migrate.php"