diff --git a/manifest.json b/manifest.json index 8fede0e..4c6a89c 100644 --- a/manifest.json +++ b/manifest.json @@ -26,7 +26,7 @@ "multi_instance": true, "services": [ "nginx", - "php7.3-fpm" + "php7.4-fpm" ], "arguments": { "install": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index 4a4eb1e..a46738e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="7.4" pkg_dependencies="postgresql php${YNH_PHP_VERSION}-tidy php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-pgsql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-curl" diff --git a/scripts/install b/scripts/install index 9f6fcb3..0c9404c 100755 --- a/scripts/install +++ b/scripts/install @@ -24,6 +24,7 @@ domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC timezone="$(cat /etc/timezone)" +phpversion=$YNH_PHP_VERSION app=$YNH_APP_INSTANCE_NAME @@ -45,6 +46,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url +ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion #================================================= # INSTALL DEPENDENCIES @@ -98,7 +100,6 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 ynh_add_fpm_config -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CONFIGURE GALETTE @@ -107,6 +108,9 @@ ynh_script_progression --message="Configuring Galette..." --weight=1 ynh_add_config --template="../conf/config.inc.php.dist" --destination="$final_path/galette/config/config.inc.php" +chmod 400 "$final_path/galette/config/config.inc.php" +chown $app:$app "$final_path/galette/config/config.inc.php" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/remove b/scripts/remove index 08bd945..0562fa4 100755 --- a/scripts/remove +++ b/scripts/remove @@ -30,14 +30,6 @@ ynh_script_progression --message="Removing the PostgreSQL database..." --weight= # Remove a database if it exists, along with the associated user ynh_psql_remove_db --db_user=$db_user --db_name=$db_name -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # REMOVE APP MAIN DIR #================================================= @@ -62,6 +54,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=3 # Remove the dedicated PHP-FPM config ynh_remove_fpm_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # REMOVE LOGROTATE CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index 684bfe4..67f2180 100644 --- a/scripts/restore +++ b/scripts/restore @@ -38,8 +38,7 @@ timezone="$(cat /etc/timezone)" #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path \ - || ynh_die "There is already a directory: $final_path " +test ! -d $final_path || ynh_die "There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS @@ -75,7 +74,6 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -ynh_add_fpm_config #================================================= # REINSTALL DEPENDENCIES