-
Notifications
You must be signed in to change notification settings - Fork 27
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
Use standard directories #1805
Use standard directories #1805
Conversation
Keeping it in |
585f459
to
22b0ef5
Compare
22b0ef5
to
087e257
Compare
@ChrisSchinnerl @n8maninger the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm so far. Haven't tested it locally yet but will do.
fmt.Println("This directory should be on a fast, reliable storage device, preferably an SSD.") | ||
fmt.Println("") | ||
|
||
_, existsErr := os.Stat(filepath.Join(dir, "consensus")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably do io.ReadDir
and then check if that directory contains anything rather than checking for a specific folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave this open so Nate sees it. Perhaps he wants to change it on walletd
and hostd
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking for anything when it's potentially PWD
is not great. That's why I checked specifically for the host/wallet database. Everything else can be rebuilt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reverted it to check for consensus
. I figured it was fine because we merely warn the user. Up for other alternatives but we don't really have the db
options since we do SQLite
and MySQL
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving but I'd still like to get some feedback from @n8maninger and @alexfreska first before merging this. On the discrepancy between this and the desktop apps.
We can handle the discrepancy in the desktop apps |
Uses standard locations for application data instead of the current directory. This brings
renterd
in line with other system services and makes it easier to manage application data.Linux, FreeBSD, OpenBSD
/etc/walletd/walletd.yml
/var/lib/walletd
macOS
~/Library/Application Support/walletd.yml
~/Library/Application Support/walletd
Windows
%APPDATA%\SiaFoundation\walletd.yml
%APPDATA%\SiaFoundation\walletd
Docker
/data/walletd.yml
/data