From bf52c5b9b9aba3e2be7a43d55f44dbc75744bf82 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 12 Sep 2022 18:00:26 -0700 Subject: [PATCH] fix: use the "state" directory in systemd unit files 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: https://github.com/ipfs/kubo/commit/b47ecd0cba85905f18b85de9dd771008adf60fd0#commitcomment-83565661 --- misc/systemd/ipfs-hardened.service | 2 +- misc/systemd/ipfs.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/systemd/ipfs-hardened.service b/misc/systemd/ipfs-hardened.service index 261b82e2a06..71383870381 100644 --- a/misc/systemd/ipfs-hardened.service +++ b/misc/systemd/ipfs-hardened.service @@ -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 diff --git a/misc/systemd/ipfs.service b/misc/systemd/ipfs.service index 0051dffdd63..c24a4c05977 100644 --- a/misc/systemd/ipfs.service +++ b/misc/systemd/ipfs.service @@ -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