mirror of
https://github.com/YunoHost-Apps/matomo_ynh.git
synced 2024-09-03 19:45:56 +02:00
Fix
This commit is contained in:
parent
6cc63520f9
commit
b8f750779f
1 changed files with 18 additions and 11 deletions
|
@ -81,20 +81,24 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..."
|
ynh_script_progression --message="Upgrading source files..."
|
||||||
|
|
||||||
# Create a temporary directory
|
if [ -z "$final_path/config/config.ini.php" ]; then
|
||||||
tmpdir="$(mktemp -d)"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
# Backup the config file in the temp dir
|
else
|
||||||
cp -a "$final_path/config" "$tmpdir"
|
# Create a temporary directory
|
||||||
|
tmpdir="$(mktemp -d)"
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Backup the config file in the temp dir
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
cp -a "$final_path/config/config.ini.php" "$tmpdir/config.ini.php"
|
||||||
|
|
||||||
# Copy the admin saved settings from tmp directory to final path
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
cp -a "$tmpdir" "$final_path/config"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
|
|
||||||
# Remove the tmp directory securely
|
# Copy the admin saved settings from tmp directory to final path
|
||||||
ynh_secure_remove --file="$tmpdir"
|
cp -a "$tmpdir/config.ini.php" "$final_path/config/config.ini.php"
|
||||||
|
|
||||||
|
# Remove the tmp directory securely
|
||||||
|
ynh_secure_remove --file="$tmpdir"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -131,7 +135,10 @@ ynh_script_progression --message="Installating composer and dependencies..."
|
||||||
|
|
||||||
ynh_install_composer --phpversion="$phpversion" --workdir="$final_path"
|
ynh_install_composer --phpversion="$phpversion" --workdir="$final_path"
|
||||||
|
|
||||||
cd "$final_path" && ynh_exec_as $app ./console core:update
|
if [ -z "$final_path/config/config.ini.php" ]; then
|
||||||
|
cd "$final_path"
|
||||||
|
ynh_exec_as $app ./console core:update
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP A CRON
|
# SETUP A CRON
|
||||||
|
|
Loading…
Reference in a new issue