From 29a799a98ae47d5eabf735ddeb234fa79ab3b732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 21:20:26 +0200 Subject: [PATCH] fix --- manifest.toml | 6 +++--- scripts/backup | 6 +----- scripts/restore | 14 +++++++------- scripts/upgrade | 23 ++--------------------- 4 files changed, 13 insertions(+), 36 deletions(-) diff --git a/manifest.toml b/manifest.toml index d78d13f..1f159a8 100644 --- a/manifest.toml +++ b/manifest.toml @@ -60,8 +60,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/fisharebest/webtrees/archive/refs/tags/2.1.20.tar.gz" - sha256 = "97f140886f6c0cb3a5d3b6ca2757dbe4e8cf63d26e96b97d98240cfa7f5fa1dd" + url = "https://github.com/fisharebest/webtrees/releases/download/2.1.20/webtrees-2.1.20.zip" + sha256 = "0e2f9ccf601e5d4579ef90d727b1630620bc22b9ef66c4aacbaf7329b3c7b49d" autoupdate.strategy = "latest_github_tag" [resources.system_user] @@ -72,7 +72,7 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server, php8.2-mbstring, php8.2-mysql, php8.2-zip, php8.2-gd, php8.2-xml, php8.2-curl, php8.2-intl, mailutils" + packages = "mariadb-server, php8.3-mbstring, php8.3-mysql, php8.3-zip, php8.3-gd, php8.3-xml, php8.3-curl, php8.3-intl, mailutils" [resources.database] type = "mysql" diff --git a/scripts/backup b/scripts/backup index eda99fe..9f67fa7 100755 --- a/scripts/backup +++ b/scripts/backup @@ -21,15 +21,11 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= diff --git a/scripts/restore b/scripts/restore index 3740315..ae3bef1 100644 --- a/scripts/restore +++ b/scripts/restore @@ -19,6 +19,13 @@ ynh_restore_file --origin_path="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" +#================================================= +# RESTORE THE MYSQL DATABASE +#================================================= +ynh_script_progression --message="Restoring the MySQL database..." --weight=1 + +ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -28,13 +35,6 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE THE MYSQL DATABASE -#================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=1 - -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 6cad7bc..a843cc3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # CHECK THE PATH #================================================= @@ -22,21 +16,8 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Upgrading source files..." -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." - # Move old app dir - #mv ${install_dir} ${install_dir}.old - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir=$install_dir --keep="data modules_v4" - - # restore data - #cp -a ${install_dir}.old/data ${install_dir} - - # delete temp directory - #ynh_secure_remove --file=${install_dir}.old -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir=$install_dir --keep="data modules_v4" chmod -R 700 $install_dir/data chmod -R o-rwx "$install_dir"