mirror of
https://github.com/YunoHost-Apps/aeneria_ynh.git
synced 2024-09-03 18:06:15 +02:00
Fixies
This commit is contained in:
parent
e7898ac0c3
commit
4fc57d4022
7 changed files with 22 additions and 24 deletions
10
README.md
10
README.md
|
@ -22,13 +22,9 @@ The idea of [æneria](https://gitlab.com/aeneria/aeneria-app) is to display elec
|
|||
|
||||
## Configuration
|
||||
|
||||
First of all:
|
||||
|
||||
* You'll need a Linky (obviously) and a [Enedis account](https://mon-compte-client.enedis.fr/)
|
||||
|
||||
Then, go parameter page to follow instructions.
|
||||
|
||||
That's it, now wait a bit to see data appear !
|
||||
* First of all, you'll need a Linky (obviously) and an [Enedis account](https://mon-compte-client.enedis.fr/)
|
||||
* After you have installed the app, just visit it and follow instructions
|
||||
* That's it, now wait a bit to see data appear !
|
||||
|
||||
## Documentation
|
||||
|
||||
|
|
|
@ -13,5 +13,5 @@ firstname=$4
|
|||
lastname=$5
|
||||
final_path=$(ynh_app_setting_get "$app" final_path)
|
||||
|
||||
# Deactivate the user in Pilea
|
||||
# Deactivate the user in aeneria
|
||||
cd "$final_path" && ynh_exec_as $app php7.3 bin/console aeneria:user:deactivate "$mail" -n
|
|
@ -8,7 +8,7 @@ about: Create a report to help us debug, it would be nice to fill the template a
|
|||
1. *Read this whole template first.*
|
||||
2. *Determine if you are on the right place:*
|
||||
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change url...), you are on the right place!*
|
||||
- *Otherwise, the issue may be due to pilea itself. Refer to its documentation or repository for help.*
|
||||
- *Otherwise, the issue may be due to aeneria itself. Refer to its documentation or repository for help.*
|
||||
- *If you have a doubt, post here, we will figure it out together.*
|
||||
3. *Delete the italic comments as you write over them below, and remove this guide.*
|
||||
---
|
||||
|
@ -29,7 +29,7 @@ about: Create a report to help us debug, it would be nice to fill the template a
|
|||
*Steps to reproduce the behavior.*
|
||||
- *If you performed a command from the CLI, the command itself is enough. For example:*
|
||||
```sh
|
||||
sudo yunohost app install pilea
|
||||
sudo yunohost app install aeneria
|
||||
```
|
||||
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
|
||||
- *If the error occurs in your browser, explain what you did:*
|
||||
|
|
|
@ -15,4 +15,4 @@
|
|||
---
|
||||
*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results*
|
||||
|
||||
[/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/pilea_ynh%20PR-NUM-%20(USERNAME)/)
|
||||
[/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/aeneria_ynh%20PR-NUM-%20(USERNAME)/)
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
#=================================================
|
||||
|
||||
# dependencies used by the app
|
||||
pkg_dependencies="apt-transport-https"
|
||||
pkg_dependencies="apt-transport-https postgresql postgresql-contrib"
|
||||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
|
||||
extra_php_dependencies="php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-ldap"
|
||||
extra_php_dependencies="php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-psql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-ldap"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -63,10 +63,12 @@ ynh_script_progression --message="Installing dependencies..." --weight=1
|
|||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# CREATE A MYSQL DATABASE
|
||||
# CREATE A PSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating a PSQL database..." --weight=1
|
||||
|
||||
ynh_psql_test_if_first_run
|
||||
|
||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
db_user="$db_name"
|
||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||
|
@ -154,12 +156,12 @@ pushd $final_path
|
|||
do
|
||||
mail=$(ynh_user_get_info --username=$username --key='mail')
|
||||
user_pass=$(ynh_string_random)
|
||||
ynh_exec_as $app php$phpversion bin/console pilea:user:add "$mail" "$user_pass"
|
||||
ynh_exec_as $app php$phpversion bin/console aeneria:user:add "$mail" "$user_pass"
|
||||
done
|
||||
|
||||
# Set admin user
|
||||
mail=$(ynh_user_get_info --username=$admin --key='mail')
|
||||
ynh_exec_as $app php$phpversion bin/console pilea:user:grant "$mail"
|
||||
ynh_exec_as $app php$phpversion bin/console aeneria:user:grant "$mail"
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
@ -176,7 +178,7 @@ ynh_replace_string "#USER#" "$app" "$cron_path"
|
|||
ynh_replace_string "#DESTDIR#" "$final_path" "$cron_path"
|
||||
|
||||
#=================================================
|
||||
# ADAPT HOOK FOR PILEA INSTANCE
|
||||
# ADAPT HOOK FOR AENERIA INSTANCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adapting hooks..." --weight=1
|
||||
|
||||
|
|
|
@ -160,26 +160,26 @@ ynh_script_progression --message="Upgrading æneria..." --weight=1
|
|||
chown -R $app: $final_path
|
||||
chmod 755 $final_path
|
||||
|
||||
# Install dependencies and Pilea
|
||||
# Install dependencies and aeneria
|
||||
pushd $final_path
|
||||
ynh_exec_as $app php$phpversion bin/console cache:clear -n
|
||||
ynh_exec_as $app php$phpversion bin/console doctrine:migrations:migrate -n
|
||||
|
||||
# Create Pilea's user
|
||||
# Create aeneria's user
|
||||
for username in $(ynh_user_list)
|
||||
do
|
||||
mail=$(ynh_user_get_info --username=$username --key='mail')
|
||||
user_exists=$(ynh_exec_as $app php$phpversion bin/console pilea:user:exist "$mail")
|
||||
user_exists=$(ynh_exec_as $app php$phpversion bin/console aeneria:user:exist "$mail")
|
||||
if [ $user_exists -eq 0 ]
|
||||
then
|
||||
user_pass=$(ynh_string_random)
|
||||
ynh_exec_as $app php$phpversion bin/console pilea:user:add "$mail" "$user_pass" -n
|
||||
ynh_exec_as $app php$phpversion bin/console aeneria:user:add "$mail" "$user_pass" -n
|
||||
fi
|
||||
done
|
||||
|
||||
# Set admin user
|
||||
mail=$(ynh_user_get_info --username=$admin --key='mail')
|
||||
ynh_exec_as $app php$phpversion bin/console pilea:user:grant "$mail"
|
||||
ynh_exec_as $app php$phpversion bin/console aeneria:user:grant "$mail"
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
@ -188,7 +188,7 @@ popd
|
|||
ynh_script_progression --message="Setuping a cron job..." --weight=1
|
||||
|
||||
cron_path="/etc/cron.d/$app"
|
||||
cp -a ../conf/pilea.cron "$cron_path"
|
||||
cp -a ../conf/aeneria.cron "$cron_path"
|
||||
chown root: "$cron_path"
|
||||
chmod 644 "$cron_path"
|
||||
|
||||
|
@ -196,7 +196,7 @@ ynh_replace_string --match_string="#USER#" --replace_string="$app" --target_file
|
|||
ynh_replace_string --match_string="#DESTDIR#" --replace_string="$final_path" --target_file="$cron_path"
|
||||
|
||||
#=================================================
|
||||
# ADAPT HOOK FOR PILEA INSTANCE
|
||||
# ADAPT HOOK FOR AENERIA INSTANCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adapting hooks..." --weight=1
|
||||
ynh_replace_string --match_string="APPNAMETOCHANGE" --replace_string=$app --target_file="../hooks/post_user_create"
|
||||
|
|
Loading…
Add table
Reference in a new issue