summaryrefslogtreecommitdiffstats
path: root/extras/init.d/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'extras/init.d/Makefile.am')
-rw-r--r--extras/init.d/Makefile.am31
1 files changed, 23 insertions, 8 deletions
diff --git a/extras/init.d/Makefile.am b/extras/init.d/Makefile.am
index da9bb00786d..8d8cc69571a 100644
--- a/extras/init.d/Makefile.am
+++ b/extras/init.d/Makefile.am
@@ -1,17 +1,32 @@
-EXTRA_DIST = glusterfsd-Debian glusterfsd-Redhat glusterfsd-SuSE glusterfs-server.plist
+EXTRA_DIST = glusterd-Debian glusterd-FreeBSD glusterd-Redhat \
+ glusterd-SuSE glusterd.plist glustereventsd-FreeBSD \
+ glustereventsd-Redhat glustereventsd-Debian
-CLEANFILES =
+CLEANFILES =
-initdir = /etc/init.d
+INIT_DIR = @initdir@
+SYSTEMD_DIR = @systemddir@
+LAUNCHD_DIR = @launchddir@
-$(GF_DISTRIBUTION):
- $(mkdir_p) $(DESTDIR)$(initdir)
- $(INSTALL_PROGRAM) $(srcdir)/glusterfsd-$(GF_DISTRIBUTION) $(DESTDIR)$(initdir)/glusterfsd
+$(GF_DISTRIBUTION):
+if WITH_SERVER
+ @if [ ! -d $(SYSTEMD_DIR) ]; then \
+ $(mkdir_p) $(DESTDIR)$(INIT_DIR); \
+ $(INSTALL_PROGRAM) glusterd-$(GF_DISTRIBUTION) $(DESTDIR)$(INIT_DIR)/glusterd; \
+ fi
+endif
+if BUILD_EVENTS
+ @if [ ! -d $(SYSTEMD_DIR) ]; then \
+ $(mkdir_p) $(DESTDIR)$(INIT_DIR); \
+ $(INSTALL_PROGRAM) glustereventsd-$(GF_DISTRIBUTION) $(DESTDIR)$(INIT_DIR)/glustereventsd; \
+ fi
+endif
install-exec-local: $(GF_DISTRIBUTION)
-install-data-local:
+install-data-local:
if GF_DARWIN_HOST_OS
- cp glusterfs-server.plist /Library/LaunchDaemons/com.zresearch.glusterfs.plist
+ $(mkdir_p) $(DESTDIR)$(LAUNCHD_DIR)
+ $(INSTALL_PROGRAM) glusterd.plist $(DESTDIR)$(LAUNCHD_DIR)/org.gluster.glusterd.plist
endif