Update 'Readme.md'

This commit is contained in:
lasimik 2021-05-17 01:37:49 +00:00
parent 98c471b2e2
commit a81f23be6d
1 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ The template from the borgmatic site (the`borgmatic.timer`) is fine, insert a st
### In the systemd service
Again, the template from the borgmatic site (the `borgmatic.service`) is good, but needs an essential change:
The line `CapabilityBoundingSet=…` must grant the additional capabilities `AP_SETUID `and `CAP_SETGID`. This will allow borgmatic (and whatever is called from it!!) to impersonate a different user (other than root).
The line `CapabilityBoundingSet=…` must grant the additional capabilities `AP_SETUID `and `CAP_SETGID`. This will allow borgmatic (and whatever is called from it!!) to act as a different user (other than root).
*__This means a softening of security settings.__ Make sure all permissions on borgmatic and scripts are set correctly!*
@ -39,7 +39,7 @@ hooks:
- sudo -u NAME DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/UID/bus notify-send --urgency=normal 'Headline' 'Body text goes <i>here</i>.'
```
(Note: The config file is in YAML, you cannot use the shell line continuation (" \\"). And use spaces, not tabs.)
(Note: The config file is in YAML, so no shell line continuation (` \`). And spaces, not tabs.)
---
@ -97,7 +97,7 @@ hooks:
on_error:
- /etc/borgmatic/notify-error.sh "{configuration_filename}" "{repository}" "{error}" "{output}"
```
Note: Inside the quotes of `echo …` we can use line continuation (" \") for better readability.
Note: Inside the quotes of `echo …` line continuation (` \`) is possible. Much better readability.
#### The notification script
For easy date and time calculations, this script makes use of `dateutils`. It will send slightly different notifications, depending on the age of the last successful backup: