From 73fbe04107d38f4561636c74d28d7a4935cbb1ef Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Tue, 28 Jan 2020 18:38:57 +0100 Subject: 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 . --- nix/local.mk | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'nix') 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 -- cgit v1.2.3