mirror of
https://github.com/YunoHost-Apps/omeka-s_ynh.git
synced 2024-09-03 19:56:05 +02:00
PHP8
This commit is contained in:
parent
00a2be4802
commit
9159d9b2c6
5 changed files with 14 additions and 23 deletions
|
@ -1,4 +1,4 @@
|
|||
user = "__DB_NAME__"
|
||||
user = "__DB_USER__"
|
||||
password = "__DB_PWD__"
|
||||
dbname = "__DB_NAME__"
|
||||
host = "localhost"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"multi_instance": true,
|
||||
"services": [
|
||||
"nginx",
|
||||
"php7.3-fpm",
|
||||
"php8.0-fpm",
|
||||
"mysql"
|
||||
],
|
||||
"arguments": {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
YNH_PHP_VERSION="8.0"
|
||||
|
||||
pkg_dependencies="imagemagick php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml"
|
||||
|
||||
|
|
|
@ -69,16 +69,6 @@ chmod 750 "$final_path"
|
|||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=5
|
||||
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
# Recreate a dedicated php-fpm config
|
||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
|
@ -89,6 +79,16 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
|||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=5
|
||||
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
# Recreate a dedicated php-fpm config
|
||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
|
|
@ -80,18 +80,9 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
|
||||
mv "$final_path" "$final_path.old"
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config/local.config.php $final_path/config/database.ini $final_path/modules $final_path/themes $final_path/files"
|
||||
|
||||
cp "$final_path.old/config/local.config.php" "$final_path/config/local.config.php"
|
||||
cp "$final_path.old/config/database.ini" "$final_path/config/database.ini"
|
||||
cp -r "$final_path.old/modules" "$final_path/modules"
|
||||
cp -r "$final_path.old/themes" "$final_path/themes"
|
||||
cp -r "$final_path.old/files" "$final_path/files"
|
||||
# delete temp directory
|
||||
ynh_secure_remove "$final_path.old"
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
|
|
Loading…
Reference in a new issue