This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
13e91af feat: provide
start
commandStart installed safenode services. If a service name or peer ID is not supplied, it will attempt to
start everything.
If the service status is
Installed
(meaning it has not been started for the first time since itwas installed) or
Stopped
, there will be an attempt to start it. If the service isRunning
wewill check again that it is actually running, and if it isn't, attempt to start it again.
Also change the integration tests here to one test which will be cross platform service
manipulation. The commands should work on different operating systems. Once a
status
command hasbeen added we will be able to use the application to validate itself.
b16b191 chore: specify root and log dirs at install time
To facilitate starting a node again with the same data, we need to supply the
--root-dir
argumentat install time. In addition to that, we need to actually create the directory and assign it the
correct permissions such that the user running the service will be able to write to it.
The log dir is also specified. This makes the logs available at system-wide locations rather than
the default directories, which is the data directory of the user running the service, which can make
them difficult to access, especially on Windows. Despite being at a system-wide location, on Linux,
the directory is assigned permissions to be written to by the
safe
user.I tested the configurations on Windows and Linux.
I have also added a utility Vagrantfile here for quick testing. The reason for using a VM is because
you need to run commands as root and actually install services. I didn't want to have to continually
clean up that mess on my dev machine.