summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2020-01-28 18:38:57 +0100
committerDanny Milosavljevic <dannym@scratchpost.org>2020-03-11 02:45:33 +0100
commit73fbe04107d38f4561636c74d28d7a4935cbb1ef (patch)
tree1c7e52ad7d5de7b76571596997d217b65827bac2 /nix
parent57f85eef462d0ce33d4ebfa3faaea1ff90dad65a (diff)
Add system start-up files for guix-daemon.
* etc/init.d/guix-daemon.in: New file. * nix/local.mk (etc/init.d/guix-daemon): New rule. (nodist_sysvinitservice_DATA): Add etc/init.d/guix-daemon.in . (CLEANFILES): Add etc/init.d/guix-daemon . * .gitignore: Add etc/init.d/guix-daemon .
Diffstat (limited to 'nix')
-rw-r--r--nix/local.mk16
1 files changed, 14 insertions, 2 deletions
diff --git a/nix/local.mk b/nix/local.mk
index dc5a8398b2..a64bdd2137 100644
--- a/nix/local.mk
+++ b/nix/local.mk
@@ -164,6 +164,16 @@ etc/guix-%.service: etc/guix-%.service.in \
"$<" > "$@.tmp"; \
mv "$@.tmp" "$@"
+sysvinitservicedir = $(sysconfdir)/init.d
+nodist_sysvinitservice_DATA = etc/init.d/guix-daemon
+
+etc/init.d/guix-daemon: etc/init.d/guix-daemon.in \
+ $(top_builddir)/config.status
+ $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
+ $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \
+ "$<" > "$@.tmp"; \
+ mv "$@.tmp" "$@"
+
# The '.conf' jobs for Upstart.
upstartjobdir = $(libdir)/upstart/system
nodist_upstartjob_DATA = etc/guix-daemon.conf etc/guix-publish.conf
@@ -177,7 +187,8 @@ etc/guix-%.conf: etc/guix-%.conf.in \
CLEANFILES += \
$(nodist_systemdservice_DATA) \
- $(nodist_upstartjob_DATA)
+ $(nodist_upstartjob_DATA) \
+ $(nodist_sysvinitservice_DATA)
EXTRA_DIST += \
%D%/AUTHORS \
@@ -185,7 +196,8 @@ EXTRA_DIST += \
etc/guix-daemon.service.in \
etc/guix-daemon.conf.in \
etc/guix-publish.service.in \
- etc/guix-publish.conf.in
+ etc/guix-publish.conf.in \
+ etc/init.d/guix-daemon.in
if CAN_RUN_TESTS