-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix: use the "state" directory in systemd unit files #9267
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
base: master
Are you sure you want to change the base?
Conversation
9fe0a30
to
bf52c5b
Compare
We may want to use the "data" ( State directory
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason w 8000 ill be displayed to describe this comment to others. Learn more.
This could be a problem for upgrade/migration is it changes the location of the ipfs repo. The user will need to manually move the repo to the new location before upgrade.
@@ -69,7 +69,7 @@ Type=notify | |||
User=ipfs | |||
Group=ipfs | |||
StateDirectory=ipfs | |||
Environment=IPFS_PATH="${HOME}" | |||
Environment=IPFS_PATH="%S" |
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.
Environment=IPFS_PATH="%S" | |
Environment=IPFS_PATH="%D" |
Seems more appropriate to use "data" directory instead of "state" directory.
@@ -40,7 +40,7 @@ Type=notify | |||
User=ipfs | |||
Group=ipfs | |||
StateDirectory=ipfs | |||
Environment=IPFS_PATH="${HOME}" | |||
Environment=IPFS_PATH="%S" |
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.
Environment=IPFS_PATH="%S" | |
Environment=IPFS_PATH="%D" |
As pointed out by @MrCowKing in, "${HOME}" isn't expanded. We use the state directory as that's guaranteed to exist (and, in the default configuration, will match the "HOME" directory of the ipfs user). See: b47ecd0#commitcomment-83565661
bf52c5b
to
7f6bb83
Compare
I think the systemd file doesn't work at all without modifications, probably for the reason mentioned. Also note this is hardcoded: |
As pointed out by @MrCowKing in, "${HOME}" isn't expanded. We use the state directory as that's guaranteed to exist (and, in the default configuration, will match the "HOME" directory of the ipfs user).
See: b47ecd0#commitcomment-83565661