mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-12-14 02:14:26 -05:00
fbd0eb7548
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.
18 lines
469 B
Desktop File
18 lines
469 B
Desktop File
[Unit]
|
|
Description=Pull and build ASB from source
|
|
Wants=pull-and-build-asb.timer
|
|
OnFailure=unit-status-email@%n.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
WorkingDirectory=/var/external/asb/xmr-btc-swap
|
|
ExecStartPre=git pull
|
|
ExecStart=/home/asb/.cargo/bin/cargo build --release --bin asb
|
|
StandardOutput=append:/var/external/asb/run/logs/pull-and-build.log
|
|
StandardError=append:/var/external/asb/run/logs/pull-and-build.log
|
|
User=asb
|
|
Group=asb
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|