mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-06 05:24:42 -04: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.
16 lines
511 B
Desktop File
16 lines
511 B
Desktop File
[Unit]
|
|
Description=Run the automated swap backend
|
|
After=start-monero-wallet-rpc.service
|
|
OnFailure=unit-status-email@%n.service
|
|
|
|
[Service]
|
|
WorkingDirectory=/var/external/asb/xmr-btc-swap
|
|
ExecStart=/home/asb/.cargo/bin/cargo run --release --bin asb -- --config /var/external/asb/run/asb-config/config.toml start
|
|
StandardOutput=append:/var/external/asb/run/logs/start-asb.log
|
|
StandardError=append:/var/external/asb/run/logs/start-asb.log
|
|
Restart=on-failure
|
|
User=asb
|
|
Group=asb
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|