From b473d9ffc32307d26b80ace18258399d42a9ef64 Mon Sep 17 00:00:00 2001 From: tecnovert Date: Tue, 5 Jan 2021 10:23:30 +0200 Subject: [PATCH] Start XMR daemons in --non-interactive mode. --- bin/basicswap_run.py | 10 +++++++--- docker/production/monero_daemon/Dockerfile | 2 +- docker/production/monero_wallet/Dockerfile | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/bin/basicswap_run.py b/bin/basicswap_run.py index e9a2726..ff95136 100755 --- a/bin/basicswap_run.py +++ b/bin/basicswap_run.py @@ -46,17 +46,21 @@ def startDaemon(node_dir, bin_dir, daemon_bin, opts=[]): def startXmrDaemon(node_dir, bin_dir, daemon_bin, opts=[]): daemon_bin = os.path.expanduser(os.path.join(bin_dir, daemon_bin)) - args = [daemon_bin, '--config-file=' + os.path.join(os.path.expanduser(node_dir), 'monerod.conf')] + opts + data_dir = os.path.expanduser(node_dir) + args = [daemon_bin, '--non-interactive', '--config-file=' + os.path.join(data_dir, 'monerod.conf')] + opts logging.info('Starting node {} --data-dir={}'.format(daemon_bin, node_dir)) - return subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # return subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + file_stdout = open(os.path.join(data_dir, 'core_stdout.log'), 'w') + file_stderr = open(os.path.join(data_dir, 'core_stderr.log'), 'w') + return subprocess.Popen(args, stdin=subprocess.PIPE, stdout=file_stdout, stderr=file_stderr) def startXmrWalletDaemon(node_dir, bin_dir, wallet_bin, opts=[]): daemon_bin = os.path.expanduser(os.path.join(bin_dir, wallet_bin)) data_dir = os.path.expanduser(node_dir) - args = [daemon_bin, '--config-file=' + os.path.join(os.path.expanduser(node_dir), 'monero_wallet.conf')] + opts + args = [daemon_bin, '--non-interactive', '--config-file=' + os.path.join(data_dir, 'monero_wallet.conf')] + opts args += opts logging.info('Starting wallet daemon {} --wallet-dir={}'.format(daemon_bin, node_dir)) diff --git a/docker/production/monero_daemon/Dockerfile b/docker/production/monero_daemon/Dockerfile index 7d0c022..4673459 100644 --- a/docker/production/monero_daemon/Dockerfile +++ b/docker/production/monero_daemon/Dockerfile @@ -22,4 +22,4 @@ COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] EXPOSE 18080 -CMD ["monerod", "--config-file=/home/monero/.monero/monerod.conf"] +CMD ["monerod", "--non-interactive", "--config-file=/home/monero/.monero/monerod.conf"] diff --git a/docker/production/monero_wallet/Dockerfile b/docker/production/monero_wallet/Dockerfile index 9305f89..0a2baa8 100644 --- a/docker/production/monero_wallet/Dockerfile +++ b/docker/production/monero_wallet/Dockerfile @@ -16,4 +16,4 @@ COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] EXPOSE 18080 -CMD ["monero-wallet-rpc", "--config-file=/home/monero/.monero/monerod.conf"] +CMD ["monero-wallet-rpc", "--non-interactive", "--config-file=/home/monero/.monero/monerod.conf"]