Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate startscript.sh in electrs module #93

Closed
wants to merge 1 commit into from

Conversation

stevenroose
Copy link

Fixes #86.

I'm new to Nix development, so I have no idea how I can test these things easily..
I'm also not super confident in the correctness, so please review thoroughly :)

@jonasnick
Copy link
Member

I test PRs like that by deploying to virtualbox as explained in the docs with electrs enabled and check its logs.

Copy link
Member

@jonasnick jonasnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting the following error when starting the module:

Jul 23 21:32:10 nix-bitcoin systemd[1]: Started Run electrs.
Jul 23 21:32:11 nix-bitcoin electrs[15328]: error: Found argument '/secrets/bitcoin-rpcpassword)' which wasn't expected, or isn't valid in this context
Jul 23 21:32:11 nix-bitcoin electrs[15328]: USAGE:
Jul 23 21:32:11 nix-bitcoin electrs[15328]:     electrs --cookie <cookie> --daemon-dir <daemon_dir> --db-dir <db_dir> --index-batch-size <index_batch_size> --jsonrpc-import --timestamp -v
Jul 23 21:32:11 nix-bitcoin electrs[15328]: For more information try --help
Jul 23 21:32:11 nix-bitcoin systemd[1]: electrs.service: Main process exited, code=exited, status=1/FAILURE
Jul 23 21:32:11 nix-bitcoin systemd[1]: electrs.service: Failed with result 'exit-code'.

@stevenroose
Copy link
Author

Hmm, it seems like the $() notation doesn't work inside ExecStart... Does it make sense to do this PR then?

@jonasnick
Copy link
Member

That's probably the reason why I made a startscript in the first place. Sorry for not remembering earlier.

@nixbitcoin
Copy link
Member

Hmm, it seems like the $() notation doesn't work inside ExecStart... Does it make sense to do this PR then?

Yes, that seems to be the case. I'm getting the same error. I've created another PR #96 that fixes the problem by placing the electrs startscript in a temporary dir.

@nixbitcoin nixbitcoin added this to In progress in nix-bitcoin Jul 26, 2019
nix-bitcoin automation moved this from In progress to Done Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
nix-bitcoin
  
Done
Development

Successfully merging this pull request may close these issues.

electrs breaks when the datadir variable is set
3 participants