1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/aeneria_ynh.git synced 2024-09-03 18:06:15 +02:00

Merge pull request #42 from YunoHost-Apps/testing

Testing
This commit is contained in:
eric_G 2023-11-27 12:34:04 +01:00 committed by GitHub
commit 37dcc93af2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 36 additions and 30 deletions

View file

@ -22,7 +22,7 @@ The idea of [æneria](https://aeneria.com) is to display energy consumption and
* Analyse energy consumption throw weather data
**Shipped version:** 1.1.6~ynh4
**Shipped version:** 1.1.6~ynh5
## Screenshots

View file

@ -16,13 +16,12 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
## Vue densemble
The idea of [æneria](https://aeneria.com) is to display energy consumption and weather data on a little dashboard that allow the user to:
L'idée de [æneria](https://aeneria.com) est d'afficher la consommation d'énergie et les données météorologiques sur un petit tableau de bord qui permet à l'utilisateur de :
* Better understand our own energy consumption
* Analyse energy consumption throw weather data
* Mieux comprendre sa propre consommation d'énergie
* Analyser la consommation d'énergie et les données météorologiques
**Version incluse :** 1.1.6~ynh4
**Version incluse :** 1.1.6~ynh5
## Captures décran

View file

@ -2,13 +2,5 @@
* First of all, you'll need a Linky and an [Enedis account](https://mon-compte-client.enedis.fr/)
* In your Enedis space, go to ["Gérer l'accès à mes données"](https://mon-compte-particulier.enedis.fr/donnees/) tab, and allow Enedis to collect and store your hourly consumption
* After that, install æneria to your Yunohost instance, visit it and just follow instructions
* That's it, now wait a bit to see data appear !
## Comming from Pilea
æneria is the new name of Pilea. This new name came whith a brand new version.
This new version introduced some breaking changes in data structure: migration from Pilea can't be done automaticly.
But don't worry, you can easilly transfer your data from Pilea to æneria following [this documentation](https://docs.aeneria.com/fr/latest/administrateur/pilea_migration.html).
* After that, install æneria to your YunoHost instance, visit it and just follow instructions
* That's it, now wait a bit to see data appear!

6
doc/ADMIN_fr.md Normal file
View file

@ -0,0 +1,6 @@
## Configuration
* Tout d'abord, vous aurez besoin d'un Linky et d'un [compte Enedis](https://mon-compte-client.enedis.fr/)
* Dans votre espace Enedis, rendez-vous dans l'onglet ["Gérer l'accès à mes données"](https://mon-compte-particulier.enedis.fr/donnees/), et permettez à Enedis de collecter et stocker votre consommation horaire
* Après cela, installez æneria sur votre instance YunoHost, visitez-la et suivez simplement les instructions
* Ça y est, attendez maintenant un peu pour voir les données apparaître !

4
doc/DESCRIPTION_fr.md Normal file
View file

@ -0,0 +1,4 @@
L'idée de [æneria](https://aeneria.com) est d'afficher la consommation d'énergie et les données météorologiques sur un petit tableau de bord qui permet à l'utilisateur de :
* Mieux comprendre sa propre consommation d'énergie
* Analyser la consommation d'énergie et les données météorologiques

View file

@ -12,7 +12,7 @@ source /etc/yunohost/apps/$app/scripts/_common.sh
usernames=$2
permission=$3
groups=$4
final_path=$(ynh_app_setting_get "$app" final_path)
install_dir=$(ynh_app_setting_get "$app" install_dir)
phpversion=$(ynh_app_setting_get "$app" phpversion)
IFS=',' read -r -a user_list <<< "$usernames"
@ -25,7 +25,7 @@ do
user_list+=("${group_array[@]}")
done
pushd $final_path
pushd $install_dir
for user in "${user_list[@]}"
do
mail=$(ynh_user_get_info --username="$user" --key=mail)

View file

@ -12,7 +12,7 @@ source /etc/yunohost/apps/$app/scripts/_common.sh
usernames=$2
permission=$3
groups=$4
final_path=$(ynh_app_setting_get "$app" final_path)
install_dir=$(ynh_app_setting_get "$app" install_dir)
phpversion=$(ynh_app_setting_get "$app" phpversion)
IFS=',' read -r -a user_list <<< "$usernames"
@ -28,5 +28,5 @@ done
for user in "${user_list[@]}"
do
mail=$(ynh_user_get_info --username="$user" --key=mail)
cd "$final_path" && ynh_exec_as $app php$phpversion bin/console aeneria:user:deactivate "$mail" -n
cd "$install_dir" && ynh_exec_as $app php$phpversion bin/console aeneria:user:deactivate "$mail" -n
done

View file

@ -5,7 +5,7 @@ name = "æneria"
description.en = "Dashboard to analyse your energy consumption data from Linky & weather"
description.fr = "Tableau de bord pour analyser votre consomation d'énergie à partir des données d'un Linky et de la météo"
version = "1.1.6~ynh4"
version = "1.1.6~ynh5"
maintainers = ["Simon Mellerin"]
@ -19,8 +19,11 @@ code = "https://gitlab.com/aeneria/aeneria-app"
yunohost = ">= 11.2"
architectures = "all"
multi_instance = true
ldap = false
sso = false
disk = "50M"
ram.build = "50M"
ram.runtime = "50M"

View file

@ -28,9 +28,9 @@ chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# NGINX CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
@ -43,9 +43,9 @@ ynh_add_fpm_config
#=================================================
# CONFIGURE AENERIA
#=================================================
ynh_script_progression --message="Configuring aeneria..." --weight=1
ynh_script_progression --message="Configuring $app..." --weight=1
ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
ynh_add_config --template=".env" --destination="$install_dir/.env"
# Restrict rights to aeneria user only
chmod 600 "$install_dir/.env"

View file

@ -10,9 +10,9 @@ source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# REMOVE NGINX CONFIGURATION
# REMOVE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the dedicated NGINX config
ynh_remove_nginx_config

View file

@ -27,10 +27,12 @@ ynh_script_progression --message="Restoring the PSQL database..." --weight=1
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
# Restore the file first, so it can have a backup if different
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"

View file

@ -58,9 +58,9 @@ chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# NGINX CONFIGURATION
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config