1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/matomo_ynh.git synced 2024-09-03 19:45:56 +02:00

Merge branch 'testing' into 4.3.0

This commit is contained in:
ericgaspar 2021-05-18 11:32:03 +02:00
commit c8e9931ad4
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 40 additions and 7 deletions

View file

@ -35,9 +35,24 @@ location ^~ __PATH__/ {
}
## disable all access to the following directories
location ~ ^__PATH__/(config|tmp|core|lang) {
location ^~ __PATH__/config/ {
deny all;
return 404;
return 403;
}
location ^~ __PATH__/tmp/ {
deny all;
return 403;
}
location ^~ __PATH__/core/ {
deny all;
return 403;
}
location ^~ __PATH__/lang/ {
deny all;
return 403;
}
location ~ __PATH__/\.ht {

View file

@ -9,7 +9,7 @@ YNH_PHP_VERSION="7.3"
extra_php_dependencies="php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring"
# Composer version
composer_version=2.0.13
YNH_COMPOSER_VERSION="2.0.13"
#=================================================
# PERSONAL HELPERS

View file

@ -78,11 +78,22 @@ then
ynh_script_progression --message="Upgrading source files..."
if [[ ! -f "$final_path/config/config.ini.php" ]]; then
# Download, check integrity, uncompress and patch the source from app.src
# config.ini.php is only created during the post-install process...
# it is therefore not present when the CI tests are carried out...
# This condition is only for CI test to go through the upgrade process
ynh_setup_source --dest_dir="$final_path"
else
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config/config.ini.php"
ynh_setup_source --dest_dir="$final_path" #--keep="foo bar" to integrate when https://github.com/YunoHost/yunohost/pull/1200 is upstream
# Copy the admin saved settings from tmp directory to final path
cp -a "$tmpdir/config.ini.php" "$final_path/config/config.ini.php"
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"
# Download, check integrity, uncompress and patch the source from app.src
#ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config/config.ini.php"
fi
fi
@ -117,10 +128,17 @@ ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencie
#=================================================
ynh_script_progression --message="Installating composer and dependencies..."
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_install_composer --phpversion="$phpversion" --workdir="$final_path"
if [[ -f "$final_path/config/config.ini.php" ]]; then
php$phpversion $final_path/console core:update
# if [[ -f "$final_path/config/config.ini.php" ]]; then
# php$phpversion $final_path/console core:update -n
# fi
php$phpversion $final_path/console core:update -n
fi
#=================================================