mirror of
https://github.com/YunoHost-Apps/matomo_ynh.git
synced 2024-09-03 19:45:56 +02:00
parent
787cbcaba8
commit
c0c31ccba2
10 changed files with 30 additions and 28 deletions
|
@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
Open source analytics platform for measuring Web statistics
|
Open source analytics platform for measuring Web statistics
|
||||||
|
|
||||||
**Shipped version:** 4.6.2~ynh1
|
**Shipped version:** 4.7.1~ynh1
|
||||||
|
|
||||||
**Demo:** https://demo.matomo.org
|
**Demo:** https://demo.matomo.org
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
|
|
||||||
Plateforme d'analyse open source de mesure de statistiques Web
|
Plateforme d'analyse open source de mesure de statistiques Web
|
||||||
|
|
||||||
**Version incluse :** 4.6.2~ynh1
|
**Version incluse :** 4.7.1~ynh1
|
||||||
|
|
||||||
**Démo :** https://demo.matomo.org
|
**Démo :** https://demo.matomo.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://builds.matomo.org/matomo-4.6.2.tar.gz
|
SOURCE_URL=https://builds.matomo.org/matomo-4.7.1.tar.gz
|
||||||
SOURCE_SUM=4e35e84a2744954ec4b4e7e5e7e8d6ad65f4258024e47b9c80670b43443315b9
|
SOURCE_SUM=32eb82296288cdfe15ec9995e32d841fca0e3527ad2727222a62cda47742d60f
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Open source analytics platform for measuring Web statistics",
|
"en": "Open source analytics platform for measuring Web statistics",
|
||||||
"fr": "Plateforme d'analyse open source de mesure de statistiques Web"
|
"fr": "Plateforme d'analyse open source de mesure de statistiques Web"
|
||||||
},
|
},
|
||||||
"version": "4.6.2~ynh1",
|
"version": "4.7.1~ynh1",
|
||||||
"url": "https://matomo.org",
|
"url": "https://matomo.org",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
"nginx",
|
"nginx",
|
||||||
"php7.3-fpm",
|
"php8.0-fpm",
|
||||||
"mysql"
|
"mysql"
|
||||||
],
|
],
|
||||||
"arguments": {
|
"arguments": {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
YNH_PHP_VERSION="7.3"
|
YNH_PHP_VERSION="8.0"
|
||||||
|
|
||||||
pkg_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"
|
pkg_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"
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ set__fpm_footprint() {
|
||||||
}
|
}
|
||||||
|
|
||||||
set__free_footprint() {
|
set__free_footprint() {
|
||||||
if [ "$fpm_footprint" = "specific" ]
|
if [ "$fpm_footprint" == "specific" ]
|
||||||
then
|
then
|
||||||
ynh_app_setting_set --app=$app --key=fpm_footprint --value="$free_footprint"
|
ynh_app_setting_set --app=$app --key=fpm_footprint --value="$free_footprint"
|
||||||
fi
|
fi
|
||||||
|
@ -72,7 +72,7 @@ ynh_app_config_validate() {
|
||||||
|
|
||||||
if [ "${changed[fpm_usage]}" == "true" ] || [ "${changed[fpm_footprint]}" == "true" ] || [ "${changed[free_footprint]}" == "true" ]; then
|
if [ "${changed[fpm_usage]}" == "true" ] || [ "${changed[fpm_footprint]}" == "true" ] || [ "${changed[free_footprint]}" == "true" ]; then
|
||||||
# If fpm_footprint is set to 'specific', use $free_footprint value.
|
# If fpm_footprint is set to 'specific', use $free_footprint value.
|
||||||
if [ "$fpm_footprint" = "specific" ]
|
if [ "$fpm_footprint" == "specific" ]
|
||||||
then
|
then
|
||||||
fpm_footprint=$free_footprint
|
fpm_footprint=$free_footprint
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -102,7 +102,6 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=3
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --usage=low --footprint=low
|
ynh_add_fpm_config --usage=low --footprint=low
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP A CRON
|
# SETUP A CRON
|
||||||
|
|
|
@ -31,14 +31,6 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=1
|
||||||
# Remove a database if it exists, along with the associated user
|
# Remove a database if it exists, along with the associated user
|
||||||
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REMOVE DEPENDENCIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Removing dependencies..." --weight=1
|
|
||||||
|
|
||||||
# Remove metapackage and its dependencies
|
|
||||||
ynh_remove_app_dependencies
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE APP MAIN DIR
|
# REMOVE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -63,6 +55,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1
|
||||||
# Remove the dedicated PHP-FPM config
|
# Remove the dedicated PHP-FPM config
|
||||||
ynh_remove_fpm_config
|
ynh_remove_fpm_config
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REMOVE DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing dependencies..." --weight=1
|
||||||
|
|
||||||
|
# Remove metapackage and its dependencies
|
||||||
|
ynh_remove_app_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC REMOVE
|
# SPECIFIC REMOVE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -29,7 +29,10 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
db_user=$db_name
|
db_user=$db_name
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$YNH_PHP_VERSION
|
||||||
|
|
||||||
|
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
|
||||||
|
fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage)
|
||||||
|
|
||||||
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
|
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
|
||||||
fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage)
|
fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage)
|
||||||
|
@ -69,6 +72,14 @@ 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"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REINSTALL DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
||||||
|
|
||||||
|
# Define and install dependencies
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -80,14 +91,6 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
# Recreate a dedicated PHP-FPM config
|
# Recreate a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
|
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REINSTALL DEPENDENCIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
|
||||||
|
|
||||||
# Define and install dependencies
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE MYSQL DATABASE
|
# RESTORE THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -20,7 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$YNH_PHP_VERSION
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue