From 33cad92d7fa9e2e76ae47d42503e89d1b325ae9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 19 Jun 2024 21:27:03 +0200 Subject: [PATCH] cleaning --- manifest.toml | 12 ++++++------ scripts/backup | 12 +----------- scripts/change_url | 2 +- scripts/install | 4 ++-- scripts/upgrade | 18 ++++-------------- 5 files changed, 14 insertions(+), 34 deletions(-) diff --git a/manifest.toml b/manifest.toml index a38b6a7..95b2d28 100644 --- a/manifest.toml +++ b/manifest.toml @@ -67,12 +67,12 @@ ram.runtime = "50M" [resources.apt] packages = [ "mariadb-server", - "php8.0-zip", - "php8.0-fileinfo", - "php8.0-xml", - "php8.0-bcmath", - "php8.0-mbstring", - "php8.0-mysql", + "php8.3-zip", + "php8.3-fileinfo", + "php8.3-xml", + "php8.3-bcmath", + "php8.3-mbstring", + "php8.3-mysql", ] [resources.database] diff --git a/scripts/backup b/scripts/backup index 6039e18..9f09283 100755 --- a/scripts/backup +++ b/scripts/backup @@ -22,23 +22,13 @@ 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" -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP LOGROTATE -#================================================= - ynh_backup --src_path="/etc/logrotate.d/$app" #================================================= diff --git a/scripts/change_url b/scripts/change_url index 4db7815..19479ab 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -23,7 +23,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 domain=$new_domain path=$new_path -ynh_add_config --template="../conf/.env.example" --destination="$install_dir/.env" +ynh_add_config --template=".env.example" --destination="$install_dir/.env" chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" diff --git a/scripts/install b/scripts/install index 4caaab9..01cc4db 100755 --- a/scripts/install +++ b/scripts/install @@ -36,7 +36,7 @@ ynh_script_progression --message="Adding system configurations related to $app.. ynh_add_nginx_config # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config # Use logrotate to manage application logfile(s) ynh_use_logrotate @@ -46,7 +46,7 @@ ynh_use_logrotate #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/.env.example" --destination="$install_dir/.env" +ynh_add_config --template=".env.example" --destination="$install_dir/.env" chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" diff --git a/scripts/upgrade b/scripts/upgrade index 1b2e894..fa26cd0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,23 +9,13 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=4 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=4 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep=".env" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --keep=".env" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -39,7 +29,7 @@ ynh_script_progression --message="Upgrading system configurations related to $ap ynh_add_nginx_config # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append