aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2021-07-09 16:26:21 -0400
committerCarl Dong <contact@carldong.me>2021-07-19 18:24:36 -0400
commit5d24cc3d82dad6812f8370c3ccc7c2b5a6c12c11 (patch)
tree0c147154e94aeebe7e9163d5f87320a41d4ad84d
parent5da2ee49d5b44de803b671aedbdd14e5c1d71ea9 (diff)
downloadbitcoin-5d24cc3d82dad6812f8370c3ccc7c2b5a6c12c11.tar.xz
guix/INSTALL: Guix installs init scripts in libdir
-rw-r--r--contrib/guix/INSTALL.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/guix/INSTALL.md b/contrib/guix/INSTALL.md
index 34fb0c8430..86f91cc87b 100644
--- a/contrib/guix/INSTALL.md
+++ b/contrib/guix/INSTALL.md
@@ -442,10 +442,10 @@ can be found
[here](https://www.gnu.org/software/automake/manual/html_node/Standard-Directory-Variables.html).
However, the Guix init scripts and service configurations for Upstart, systemd,
-SysV, and OpenRC are installed to launch
+SysV, and OpenRC are installed (in `${libdir}`) to launch
`${localstatedir}/guix/profiles/per-user/root/current-guix/bin/guix-daemon`,
-which does not yet exist, and will only exist after `root` performs their first
-`guix pull`. TODO: Link to `guix pull` as root section
+which does not yet exist, and will only exist after [`root` performs their first
+`guix pull`](#guix-pull-as-root).
We need to create a `-original` version of these init scripts that's pointed to
the binaries we just built and `make install`'ed in `${bindir}` (normally,
@@ -455,8 +455,9 @@ Example for `systemd`, run as `root`:
```sh
# Create guix-daemon-original.service by modifying guix-daemon.service
+libdir=# set according to your PREFIX (default is /usr/local/lib)
bindir="$(dirname $(command -v guix-daemon))"
-sed -E -e "s|/\S*/guix/profiles/per-user/root/current-guix/bin/guix-daemon|${bindir}/guix-daemon|" /etc/systemd/system/guix-daemon.service > /etc/systemd/system/guix-daemon-original.service
+sed -E -e "s|/\S*/guix/profiles/per-user/root/current-guix/bin/guix-daemon|${bindir}/guix-daemon|" "${libdir}"/systemd/system/guix-daemon.service > /etc/systemd/system/guix-daemon-original.service
chmod 664 /etc/systemd/system/guix-daemon-original.service
# Make systemd recognize the new service