Sécuriser la mise à niveau depuis PHP 8.2
This commit is contained in:
parent
9d89a871cd
commit
3eb0cc5f16
2 changed files with 5 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ id = "globinours"
|
||||||
name = "Globinours"
|
name = "Globinours"
|
||||||
description.en = "Lightweight animal shelter management"
|
description.en = "Lightweight animal shelter management"
|
||||||
description.fr = "Gestion légère et complète pour refuges animaliers"
|
description.fr = "Gestion légère et complète pour refuges animaliers"
|
||||||
version = "1.0.0-rc.3~ynh3"
|
version = "1.0.0-rc.3~ynh4"
|
||||||
maintainers = ["OverSu"]
|
maintainers = ["OverSu"]
|
||||||
|
|
||||||
[upstream]
|
[upstream]
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source _common.sh
|
source _common.sh
|
||||||
if [[ -f "$install_dir/scripts/backup.php" && -f "$data_dir/refuge.sqlite" ]]; then
|
if [[ -f "$install_dir/scripts/backup.php" && -f "$data_dir/refuge.sqlite" ]] && \
|
||||||
|
php -l "$install_dir/app/Services/BackupService.php" >/dev/null 2>&1; then
|
||||||
ynh_exec_as_app php "$install_dir/scripts/backup.php" pre-upgrade-yunohost
|
ynh_exec_as_app php "$install_dir/scripts/backup.php" pre-upgrade-yunohost
|
||||||
|
elif [[ -f "$data_dir/refuge.sqlite" ]]; then
|
||||||
|
ynh_print_warn --message="La sauvegarde applicative préalable est ignorée car l'ancienne version n'est pas compatible avec PHP $php_version. La sauvegarde de sécurité YunoHost reste active."
|
||||||
fi
|
fi
|
||||||
touch "$data_dir/storage/maintenance.flag"
|
touch "$data_dir/storage/maintenance.flag"
|
||||||
trap 'rm -f "$data_dir/storage/maintenance.flag"' EXIT
|
trap 'rm -f "$data_dir/storage/maintenance.flag"' EXIT
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue