1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/omeka-s_ynh.git synced 2024-09-03 19:56:05 +02:00
This commit is contained in:
ericgaspar 2022-05-20 18:45:41 +02:00
parent 00a2be4802
commit 9159d9b2c6
No known key found for this signature in database
GPG key ID: 574F281483054D44
5 changed files with 14 additions and 23 deletions

View file

@ -1,4 +1,4 @@
user = "__DB_NAME__" user = "__DB_USER__"
password = "__DB_PWD__" password = "__DB_PWD__"
dbname = "__DB_NAME__" dbname = "__DB_NAME__"
host = "localhost" host = "localhost"

View file

@ -26,7 +26,7 @@
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
"nginx", "nginx",
"php7.3-fpm", "php8.0-fpm",
"mysql" "mysql"
], ],
"arguments": { "arguments": {

View file

@ -4,7 +4,7 @@
# COMMON VARIABLES # 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" pkg_dependencies="imagemagick php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml"

View file

@ -69,16 +69,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$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 # SPECIFIC RESTORATION
#================================================= #=================================================
@ -89,6 +79,16 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Define and install dependencies # Define and install dependencies
ynh_install_app_dependencies $pkg_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 # RESTORE THE MYSQL DATABASE
#================================================= #=================================================

View file

@ -80,18 +80,9 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --weight=1 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 # 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 fi
chmod 750 "$final_path" chmod 750 "$final_path"