Skip to content

Commit

Permalink
fix: use the "state" directory in systemd unit files
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Stebalien committed Sep 13, 2022
1 parent 007295d commit 9fe0a30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion misc/systemd/ipfs-hardened.service
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Type=notify
User=ipfs
Group=ipfs
StateDirectory=ipfs
Environment=IPFS_PATH="${HOME}"
Environment=IPFS_PATH="%S"
ExecStart=/usr/bin/ipfs daemon --init --migrate
Restart=on-failure
KillSignal=SIGINT
Expand Down
2 changes: 1 addition & 1 deletion misc/systemd/ipfs.service
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Type=notify
User=ipfs
Group=ipfs
StateDirectory=ipfs
Environment=IPFS_PATH="${HOME}"
Environment=IPFS_PATH="%S"
ExecStart=/usr/bin/ipfs daemon --init --migrate
Restart=on-failure
KillSignal=SIGINT
Expand Down

0 comments on commit 9fe0a30

Please sign in to comment.