From 5d24cc3d82dad6812f8370c3ccc7c2b5a6c12c11 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Fri, 9 Jul 2021 16:26:21 -0400 Subject: guix/INSTALL: Guix installs init scripts in libdir --- contrib/guix/INSTALL.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'contrib') 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 -- cgit v1.2.3