mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-09 21:35:58 +00:00
7a76516534
Add support for `service blockchain on/off` in the console. Add service on/off command for each process started by, ie `service blockchain on/off` and `service whisper on/off`. `service blockchain off` - Kills the blockchain process, stops the web3 provider, and shuts down the proxy (if used). In the case of `embark blockchain`, the entire process is exited. `service blockchain on` - Starts the blockchain process *as a child process of the main embark process* then starts the web3 provider. This happens regardless of whether or not it was initially started with `embark blockchain` (see known issues). ## Known issues 1. If the blockchain process was started with `embark blockchain`, and then the blockchain process is killed with the `service blockchain off` command, when the blockchain process is restarted with `service blockchain on`, it will be restarted as a child process of the main embark process. It may be possible to allow for the blockchain process to be restarted in the same process it was originally started in, however this will take more development effort and can be handled in a different PR. 2. Parity has not been tested as it is currently not working in the master branch. 3. This PR adds a generic registration of commands for each process, ie `service whisper on/off`, however the only supported command is the `service blockchain on/off` command. Further support for other commands can be handled in separate PRs.