diff --git a/bin/basicswap_run.py b/bin/basicswap_run.py index 40d71ef..9391bfd 100755 --- a/bin/basicswap_run.py +++ b/bin/basicswap_run.py @@ -39,22 +39,23 @@ def signal_handler(sig, frame): def startDaemon(node_dir, bin_dir, daemon_bin, opts=[]): daemon_bin = os.path.expanduser(os.path.join(bin_dir, daemon_bin)) - args = [daemon_bin, '-datadir=' + os.path.expanduser(node_dir)] + opts + datadir_path = os.path.expanduser(node_dir) + args = [daemon_bin, '-datadir=' + datadir_path] + opts logging.info('Starting node ' + daemon_bin + ' ' + '-datadir=' + 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, cwd=datadir_path) def startXmrDaemon(node_dir, bin_dir, daemon_bin, opts=[]): daemon_bin = os.path.expanduser(os.path.join(bin_dir, daemon_bin)) - data_dir = os.path.expanduser(node_dir) - args = [daemon_bin, '--non-interactive', '--config-file=' + os.path.join(data_dir, 'monerod.conf')] + opts + datadir_path = os.path.expanduser(node_dir) + args = [daemon_bin, '--non-interactive', '--config-file=' + os.path.join(datadir_path, '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) - 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) + file_stdout = open(os.path.join(datadir_path, 'core_stdout.log'), 'w') + file_stderr = open(os.path.join(datadir_path, 'core_stderr.log'), 'w') + return subprocess.Popen(args, stdin=subprocess.PIPE, stdout=file_stdout, stderr=file_stderr, cwd=datadir_path) def startXmrWalletDaemon(node_dir, bin_dir, wallet_bin, opts=[]): diff --git a/doc/release-notes.md b/doc/release-notes.md index c9dcb53..06d41a0 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,4 +1,9 @@ +0.0.x +============== +- Set working dir to datadir for daemons. + + 0.0.27 ==============