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

feat: Email log after service execution

This commit is contained in:
Lionel Coupouchetty-Ramouchetty 2020-02-25 13:35:23 +01:00
parent f0cf619436
commit df73c9177a
2 changed files with 3 additions and 0 deletions

View file

@ -49,6 +49,8 @@ Sat *-*-1..7 18:00:00 : The first saturday of every month at 18:00
5,17:00 : Every day at 5 AM and at 5 PM 5,17:00 : Every day at 5 AM and at 5 PM
After each invocation an e-mail will be sent to root@yourdomain.tld with the execution log.
See here for more info : https://wiki.archlinux.org/index.php/Systemd/Timers#Realtime_timer See here for more info : https://wiki.archlinux.org/index.php/Systemd/Timers#Realtime_timer
At the end of the installation, the app displays the public_key and the user to give to the person who has access to the server B. At the end of the installation, the app displays the public_key and the user to give to the person who has access to the server B.

View file

@ -5,6 +5,7 @@ After=network.target
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=/usr/local/bin/backup-with-__APP__-answerbot ExecStart=/usr/local/bin/backup-with-__APP__-answerbot
ExecStartPost=/bin/bash -c 'echo -e "Subject: YunoHost Restic backup log\n$(/bin/journalctl _SYSTEMD_INVOCATION_ID=`systemctl show -p InvocationID --value __APP__.service`)" | /usr/sbin/sendmail root'
User=root User=root
Group=root Group=root