From 3cb4ea773fe340bc3046ae2cc83f27cdff217e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 6 Jun 2022 19:06:50 +0200 Subject: [PATCH] Php8 (#129) * Auto-update README * PHP8 Co-authored-by: yunohost-bot --- manifest.json | 2 +- scripts/_common.sh | 4 ++-- scripts/install | 2 +- scripts/remove | 2 +- scripts/restore | 16 ++++++++-------- scripts/upgrade | 16 ++++++++-------- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/manifest.json b/manifest.json index 753bf1e..e419830 100644 --- a/manifest.json +++ b/manifest.json @@ -26,7 +26,7 @@ "multi_instance": true, "services": [ "nginx", - "php7.3-fpm", + "php8.0-fpm", "mysql" ], "arguments": { diff --git a/scripts/_common.sh b/scripts/_common.sh index d77187a..6d0ca06 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,9 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="8.0" -pkg_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-opcache \ +pkg_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-opcache \ php${YNH_PHP_VERSION}-fileinfo php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml" #================================================= diff --git a/scripts/install b/scripts/install index bf91cb3..d07cfde 100644 --- a/scripts/install +++ b/scripts/install @@ -129,7 +129,7 @@ ynh_add_systemd_config #================================================= ynh_script_progression --message="Initializing database..." --weight=6 -ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name" \ +ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \ < "$final_path/schema/ttrss_schema_mysql.sql" sudo -u $app php${phpversion} ${final_path}/update.php --update-schema=force-yes diff --git a/scripts/remove b/scripts/remove index 65fe5bc..986e6dc 100644 --- a/scripts/remove +++ b/scripts/remove @@ -53,7 +53,7 @@ ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." --weight=4 +ynh_script_progression --message="Removing the app main directory..." --weight=4 # Remove the app directory securely ynh_secure_remove --file="$final_path" diff --git a/scripts/restore b/scripts/restore index 7a5b057..57eccd3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,6 +66,14 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -75,14 +83,6 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_add_fpm_config -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=1 - -# Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies - #================================================= # RESTORE THE MYSQL DATABASE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c93cb9b..186577f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -110,14 +110,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -133,6 +125,14 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # SPECIFIC UPGRADE #=================================================