mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-02-28 10:41:13 -05:00

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.
12 lines
230 B
Desktop File
12 lines
230 B
Desktop File
[Unit]
|
|
Description=Restart ASB service
|
|
After=watch-asb-binary-change.path
|
|
OnFailure=unit-status-email@%n.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/usr/bin/systemctl restart start-asb.service
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|