Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 36cc6d4f authored by Arthur BOUDREAULT's avatar Arthur BOUDREAULT
Browse files

refactor: add full path to script + style changes in readme

parent e5bba4b8
No related branches found
No related tags found
1 merge request!18✅Resolve "How to auto update apps"
Pipeline #3621 passed with warnings
...@@ -112,8 +112,8 @@ ynh_apps: ...@@ -112,8 +112,8 @@ ynh_apps:
- `link` correspond au nom de l'application Yunohost qu'on veut installer. - `link` correspond au nom de l'application Yunohost qu'on veut installer.
#### Concernant les arguments #### Concernant les arguments
- `domain` est indispensable. Il faut choisir un des domaines de son instance Yunohost. - `domain` est obligatoire. Il faut choisir un des domaines de son instance Yunohost.
- `path` est indispensable. Il faut choisir une URL pour accéder à son application comme `domain.tld/my_app`. Utilisez juste `/` si l'application doit s'installer sur un sous-domaine. - `path` est obligatoire. Il faut choisir une URL pour accéder à son application comme `domain.tld/my_app`. Utilisez juste `/` si l'application doit s'installer sur un sous-domaine.
- `is_public` est un argument qu'on retrouve souvent. Paramétré sur `yes`, l'application sera accessible à tout le monde, même sans authentification sur le portail SSO Yunohost. Paramétré sur `no`, l'application ne sera accessible qu'après authentification. - `is_public` est un argument qu'on retrouve souvent. Paramétré sur `yes`, l'application sera accessible à tout le monde, même sans authentification sur le portail SSO Yunohost. Paramétré sur `no`, l'application ne sera accessible qu'après authentification.
Pour les autres arguments, il faut se référer au `manifest.json` disponible dans le dépôt de l'application Yunohost qu'on installe. Vous pouvez en apprendre plus sur cette partie [ici](https://yunohost.org/fr/packaging_apps_manifest). Pour les autres arguments, il faut se référer au `manifest.json` disponible dans le dépôt de l'application Yunohost qu'on installe. Vous pouvez en apprendre plus sur cette partie [ici](https://yunohost.org/fr/packaging_apps_manifest).
...@@ -140,15 +140,16 @@ ynh_autoupdate: ...@@ -140,15 +140,16 @@ ynh_autoupdate:
special_time: "daily" #Choices are [annually,daily,hourly,monthly,reboot,weekly,yearly] special_time: "daily" #Choices are [annually,daily,hourly,monthly,reboot,weekly,yearly]
apps: True apps: True
system: True system: True
dest_script: "/usr/local/bin/ynh_autoupdate.sh"
``` ```
Une tâche cron peut être mise en place pour automatiser la vérification des mises à jour système et applications suivant la périodicité de votre choix. Une tâche cron peut être mise en place pour automatiser la vérification des mises à jour système et applications suivant la périodicité de votre choix.
- `ynh_autoupdate.scheduled` : activez la tâche cron en mettant la valeur à `True`. - `ynh_autoupdate.scheduled` : activez la tâche cron en mettant la valeur à `True`.
- `ynh_autoupdate.special_time`: est indispensable. Elle permet de préciser quand vous souhaitez que cette tâche soit exécutée. Valeurs possibles : (`annually`,`daily`,`hourly`,`monthly`,`reboot`,`weekly`,`yearly`). - `ynh_autoupdate.special_time`: est obligatoire. Elle permet de préciser quand vous souhaitez que cette tâche soit exécutée. Valeurs possibles : (`annually`,`daily`,`hourly`,`monthly`,`reboot`,`weekly`,`yearly`).
Pour en savoir plus sur les _special times_, cliquez [ici](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/cron_module.html). Pour en savoir plus sur les _special times_, cliquez [ici](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/cron_module.html).
- `ynh_autoupdate.apps` : est indispensable. Activez la mise à jour automatique des applications Yunohost en mettant la valeur à `True`. - `ynh_autoupdate.apps` : est obligatoire. Activez la mise à jour automatique des applications Yunohost en mettant la valeur à `True`.
- `ynh_autoupdate.system` : est indispensable. Activez la mise à jour automatique du système Yunohost en mettant la valeur à `True`. - `ynh_autoupdate.system` : est obligatoire. Activez la mise à jour automatique du système Yunohost en mettant la valeur à `True`.
- `ynh_autoupdate.dest_script` : c'est le chemin du répertoire où le script de mise à jour sera installé sur le serveur. La valeur par défaut est `/usr/local/bin`. - `ynh_autoupdate.dest_script` : c'est le chemin du répertoire où le script de mise à jour sera installé sur le serveur. La valeur par défaut est `/usr/local/bin`, le script s'appelle `ynh_autoupdate.sh`.
Si des mises à jour sont disponibles, elles sont faites automatiquement. En cas de problème suite à la mise à jour d'une application, vous pouvez lire les logs qui sont disponibles ici `/var/log/yunohost/categories/operation`. Vous avez aussi la possibilité de revenir à la version précédente car Yunohost fait toujours une sauvegarde automatique d'une application lorsqu'elle est mise à jour. Si des mises à jour sont disponibles, elles sont faites automatiquement. En cas de problème suite à la mise à jour d'une application, vous pouvez lire les logs qui sont disponibles ici `/var/log/yunohost/categories/operation`. Vous avez aussi la possibilité de revenir à la version précédente car Yunohost fait toujours une sauvegarde automatique d'une application lorsqu'elle est mise à jour.
......
...@@ -144,11 +144,11 @@ ynh_autoupdate: ...@@ -144,11 +144,11 @@ ynh_autoupdate:
``` ```
A cron job can been set up to automate the check for system and application updates on a schedule of your choice. A cron job can been set up to automate the check for system and application updates on a schedule of your choice.
- `ynh_autoupdate.scheduled` : enable the cron job by setting the value to `True`. - `ynh_autoupdate.scheduled` : enables the cron job by setting the value to `True`.
- `ynh_autoupdate.special_time`: it is mandatory. It allows you to specify when you want this task to be executed. Possible values: (`annually`,`daily`,`hourly`,`monthly`,`reboot`,`weekly`,`yearly`). To learn more about special times, click [here](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/cron_module.html). - `ynh_autoupdate.special_time`: it is mandatory. It allows you to specify when you want this task to be executed. Possible values: (`annually`,`daily`,`hourly`,`monthly`,`reboot`,`weekly`,`yearly`). To learn more about special times, click [here](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/cron_module.html).
- `ynh_autoupdate.apps`: is required. Enable automatic updating of Yunohost applications by setting the value to `True`. - `ynh_autoupdate.apps`: is mandatory. Enable automatic updating of Yunohost applications by setting the value to `True`.
- `ynh_autoupdate.system`: is required. Enable automatic updating of the Yunohost system by setting the value to `True`. - `ynh_autoupdate.system`: is mandatory. Enable automatic updating of the Yunohost system by setting the value to `True`.
- `ynh_autoupdate.dest_script`: it is the path to the directory where the update script will be installed on the server. The default value is `/usr/local/bin`. - `ynh_autoupdate.dest_script`: it is the path to the directory where the update script will be installed on the server. The default value is `/usr/local/bin`, the script is named `ynh_autoupdate.sh`.
If available, updates are done automatically. In case of problems following an application update, you can read logs located in `/var/log/yunohost/categories/operation` . You also have the possibility to rollback to the previous version since Yunohost always makes an automatic backup of an application when it is updated. If available, updates are done automatically. In case of problems following an application update, you can read logs located in `/var/log/yunohost/categories/operation` . You also have the possibility to rollback to the previous version since Yunohost always makes an automatic backup of an application when it is updated.
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
- name: Creates Yunohost autoupdate script - name: Creates Yunohost autoupdate script
ansible.builtin.template: ansible.builtin.template:
src: "templates/ynh_autoupdate.sh.j2" src: "templates/ynh_autoupdate.sh.j2"
dest: "{{ ynh_autoupdate.dest_script | default('/usr/local/bin') }}" dest: "{{ ynh_autoupdate.dest_script | default('/usr/local/bin/ynh_autoupdate.sh') }}"
owner: root owner: root
group: root group: root
mode: '0740' mode: '0740'
...@@ -32,5 +32,5 @@ ...@@ -32,5 +32,5 @@
Logs can be found in /var/log/yunohost/categories/operation" Logs can be found in /var/log/yunohost/categories/operation"
special_time: "{{ ynh_autoupdate.special_time }}" special_time: "{{ ynh_autoupdate.special_time }}"
user: root user: root
job: "{{ ynh_autoupdate.dest_script | default('/usr/local/bin') }}" job: "{{ ynh_autoupdate.dest_script | default('/usr/local/bin/ynh_autoupdate.sh') }}"
cron_file: ynh_autoupdate_cron cron_file: ynh_autoupdate_cron
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment