From b1ba2ac1527f67dfe70e97d944f655bfe554b84e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 May 2024 07:48:48 +0200 Subject: [PATCH 1/3] cleaning --- scripts/install | 9 ++------- scripts/upgrade | 18 ++++-------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/scripts/install b/scripts/install index 28274c0..f925800 100755 --- a/scripts/install +++ b/scripts/install @@ -26,12 +26,7 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config @@ -41,7 +36,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/config.php" --destination="$install_dir/config.php" +ynh_add_config --template="config.php" --destination="$install_dir/config.php" chmod 400 "$install_dir/config.php" chown $app:$app "$install_dir/config.php" diff --git a/scripts/upgrade b/scripts/upgrade index 8e45d34..41e738d 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=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=1 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="config.php" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --keep="config.php" chown -R $app:www-data "$install_dir" @@ -45,7 +35,7 @@ popd ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config From 14d1676aeabb6ea265927ade6222412cafaa62ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 May 2024 07:49:18 +0200 Subject: [PATCH 2/3] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index f87c50f..bb71786 100644 --- a/manifest.toml +++ b/manifest.toml @@ -53,7 +53,7 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server php8.2-intl php8.2-mysql php8.2-gd php8.2-fileinfo php8.2-zip php8.2-ldap" + packages = "mariadb-server, php8.2-intl, php8.2-mysql, php8.2-gd, php8.2-fileinfo, php8.2-zip, php8.2-ldap" [resources.database] type = "mysql" From aeb15e4d538acf888955825ecd7a04a5f9a1b0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 May 2024 07:50:09 +0200 Subject: [PATCH 3/3] Update backup --- scripts/backup | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/backup b/scripts/backup index 62ffbee..425807a 100755 --- a/scripts/backup +++ b/scripts/backup @@ -33,10 +33,6 @@ ynh_backup --src_path="$data_dir" --is_big 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" #=================================================