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

Add check to script to make sure user is on a farmer #5

Open
steppsr opened this issue Apr 18, 2022 · 2 comments
Open

Add check to script to make sure user is on a farmer #5

steppsr opened this issue Apr 18, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@steppsr
Copy link
Owner

steppsr commented Apr 18, 2022

Add check to script to make sure user is on a farmer. If user is on a harvester, the chia wallet commands will not return the needed data.

@steppsr steppsr added the enhancement New feature or request label Apr 18, 2022
@Jacek-ghub
Copy link

It would be nice to somehow check whether port 9256 is open. On Linux, openssl can be used, and actually test for chia cert. Although, I don't know what could be done on Win side to do a similar test.

Although, as mentioned on chiaforum, one can ssh forward port 9256 to a remote box and run those scripts from there. This way, regardless of what OS is the (remote) node, the script can run on whatever OS is convenient for the user.

@steppsr
Copy link
Owner Author

steppsr commented Apr 21, 2022

This script isn't using the RPC API, it is running CLI commands and capturing the output. Using RPC in PowerShell required merging the Cert and Key into a PFX file, which you need additional software to complete (such as OpenSSL). I didn't want to require the the user to install more software which I why I used the CLI.

However, I should be able to use PowerShell to see if the Wallet port is open. Then if not I can give a graceful message to the user.

Test-NetConnection -ComputerName 127.0.0.1 -Port 9256 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants