1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/moodle_ynh.git synced 2024-09-03 19:46:23 +02:00
yalh76 2022-06-28 22:06:37 +02:00
parent 929f820e94
commit ca7ed3f184

View file

@ -109,9 +109,23 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=6
# Create a temporary directory
tmpdir="$(mktemp -d)"
# Backup the config file in the temp dir
cp -a "$final_path/config.php" "$tmpdir/config.php"
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.php"
#php${phpversion} $final_path/admin/cli/upgrade.php
ynh_setup_source --dest_dir="$final_path"
# Copy the admin saved settings from tmp directory to final path
cp -a "$tmpdir/config.php" "$final_path/config.php"
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"
fi
chmod 750 "$final_path"