1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/borgserver_ynh.git synced 2024-09-03 20:36:20 +02:00

[fix] Missing var in cron

This commit is contained in:
ljf 2022-09-30 01:26:09 +02:00
parent 9f95ae0fb5
commit 8c4432cb80
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -1,2 +1,2 @@
SHELL=/bin/bash
0 9,20 * * * root : Monitor __SSH_USER__ backup ; ALERT_DELAY="$(grep '^alert_delay: ' /etc/yunohost/apps/__APP__/settings.yml | awk -F\' '{print $2}')"; [[ $(find /home/__SSH_USER__/backup/data -follow -mtime -${ALERT_DELAY} -ls | wc -l) > 0 ]] || ( echo "No file has been backuped in /home/__SSH_USER__ since ${ALERT_DELAY} days" | mail -s "[YNH] Backup missing : __SSH_USER__" $(grep '^alert_mails: ' /etc/yunohost/apps/__APP__/settings.yml | awk '{print $2}'))
0 9,20 * * * root : Monitor __SSH_USER__ backup ; ALERT_DELAY="$(grep '^alert_delay: ' /etc/yunohost/apps/__APP__/settings.yml | awk -F\' '{print $2}')"; [[ $(find __DATADIR__/backup/data -follow -mtime -${ALERT_DELAY} -ls | wc -l) > 0 ]] || ( echo "No file has been backuped in __DATADIR__ since ${ALERT_DELAY} days" | mail -s "[YNH] Backup missing : __SSH_USER__" $(grep '^alert_mails: ' /etc/yunohost/apps/__APP__/settings.yml | awk '{print $2}'))

View file

@ -48,8 +48,8 @@
"name": "datadir",
"type": "string",
"ask": {
"en": "Indicate the directory where create the user directory with the borg archive",
"fr": "Indiquez le dossier où créer le dossier utilisateur contenant l'archive borg"
"en": "Indicate the path of the ssh user home directory where create the borg archive",
"fr": "Indiquez le chemin du dossier de l'utilisateur ssh où créer l'archive borg"
},
"default": "/home/__SSH_USER__"
},