mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-12-13 18:04:31 -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.
15 lines
609 B
Desktop File
15 lines
609 B
Desktop File
[Unit]
|
|
Description=monero-wallet-rpc for the automated swap backend (asb)
|
|
After=network.target
|
|
OnFailure=unit-status-email@%n.service
|
|
|
|
[Service]
|
|
ExecStart=/var/external/asb/monero/bin/monero-wallet-rpc --stagenet --daemon-host stagenet.community.xmr.to --rpc-bind-port 38083 --disable-rpc-login --wallet-dir /var/external/asb/monero/data/stagenet/asb-wallets
|
|
ExecStartPost=/usr/bin/bash -c "i=1; while [ $i -ne 0 ]; do tail -n1 /var/external/asb/monero/bin/monero-wallet-rpc.log | grep 'Starting wallet RPC server'; i=$?; sleep 5; done"
|
|
Restart=always
|
|
User=asb
|
|
Group=asb
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|