From cfb885c49e536e6215ad0dad4bc7eace1182a1dc Mon Sep 17 00:00:00 2001 From: Daniel Karzel Date: Tue, 9 Mar 2021 17:35:00 +1100 Subject: [PATCH] more cleanup --- docs/setup/asb/systemd/monero-wallet-rpc.service | 2 +- docs/setup/asb/systemd/monerod.service | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/setup/asb/systemd/monero-wallet-rpc.service b/docs/setup/asb/systemd/monero-wallet-rpc.service index 7e8ca19e..35e9eb42 100644 --- a/docs/setup/asb/systemd/monero-wallet-rpc.service +++ b/docs/setup/asb/systemd/monero-wallet-rpc.service @@ -7,7 +7,7 @@ OnFailure=unit-status-email@%n.service Type=simple ExecStart=/var/external/asb/monero/bin/monero-wallet-rpc --stagenet --daemon-address 127.0.0.1:38081 --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 +Restart=on-failure User=asb Group=asb diff --git a/docs/setup/asb/systemd/monerod.service b/docs/setup/asb/systemd/monerod.service index bd490ff6..8f710100 100644 --- a/docs/setup/asb/systemd/monerod.service +++ b/docs/setup/asb/systemd/monerod.service @@ -1,15 +1,19 @@ [Unit] Description=monerod for the automated swap backend (asb) -After=network.target + +# https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ +After=network-online.target +Wants=network-online.target + OnFailure=unit-status-email@%n.service [Service] Type=simple + ExecStart=/var/external/asb/monero/bin/monerod --stagenet --data-dir /var/external/asb/monero/data/stagenet/monerod --non-interactive -# ExecStartPost=/usr/bin/bash -c "i=1; while [ $i -ne 0 ]; do cat /var/external/asb/monero/bin/monerod.log | grep 'core RPC server started ok'; i=$?; sleep 1; done" -# StandardOutput=append:/var/external/asb/monero/bin/monerod.log -# StandardError=append:/var/external/asb/monero/bin/monerod.log -Restart=always + +Restart=on-failure + User=asb Group=asb