mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-06 21:44:49 -04:00
Send emails OnFailure through dedicated service
The unit-status-email@.service allows being triggered through multiple services with @. Note that everything after the @ is passed to the unit-status-email@.service as parameter. We pass the complete service name OnFailure using %n. The parameter can then be accessed by %i within the unit-status-email@.service. Hence, to pass the service name to our email script for processing we use %i within unit-status-email@.service.
This commit is contained in:
commit
fbd0eb7548
5 changed files with 11 additions and 5 deletions
6
docs/setup/asb/systemd/unit-status-email@.service
Normal file
6
docs/setup/asb/systemd/unit-status-email@.service
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=%i email notification
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/bash -c '/usr/local/bin/systemd-email.sh daniel@coblox.tech %i'
|
Loading…
Add table
Add a link
Reference in a new issue