2 # Copyright (C) 2000-2015 Kern Sibbald
3 # License: BSD 2-Clause; see file LICENSE-FOSS
5 # This file is used as the template to create the
6 # Makefile for the RedHat specific installation.
8 # 15 November 2001 -- Kern Sibbald
10 # for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
14 INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 754
18 install: install-autostart
20 install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir
23 @$(INSTALL_PROGRAM) ../../scripts/logrotate $(DESTDIR)/etc/logrotate.d/bacula
26 @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-fd; then \
27 /sbin/chkconfig --del bacula-fd; \
29 @$(INSTALL_PROGRAM) bacula-fd $(DESTDIR)/etc/rc.d/init.d/bacula-fd
30 # set symlinks for script at startup and shutdown
31 @if test x$(DESTDIR) = x ; then \
32 /sbin/chkconfig --add bacula-fd; \
37 @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-sd; then \
38 /sbin/chkconfig --del bacula-sd; \
40 @$(INSTALL_PROGRAM) bacula-sd $(DESTDIR)/etc/rc.d/init.d/bacula-sd
41 # set symlinks for script at startup and shutdown
42 @if test x$(DESTDIR) = x ; then \
43 /sbin/chkconfig --add bacula-sd; \
47 install-autostart-dir:
48 @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-dir; then \
49 /sbin/chkconfig --del bacula-dir; \
51 @$(INSTALL_PROGRAM) bacula-dir $(DESTDIR)/etc/rc.d/init.d/bacula-dir
52 # set symlinks for script at startup and shutdown
53 @if test x$(DESTDIR) = x ; then \
54 /sbin/chkconfig --add bacula-dir; \
58 uninstall: uninstall-autostart
60 uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir
63 @rm -f $(DESTDIR)/etc/logrotate.d/bacula
65 uninstall-autostart-fd:
66 @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-fd; then \
67 /sbin/chkconfig --del bacula-fd; \
69 @rm -f $(DESTDIR)/etc/rc.d/init.d/bacula-fd
72 uninstall-autostart-sd:
73 @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-sd; then \
74 /sbin/chkconfig --del bacula-sd; \
76 @rm -f $(DESTDIR)/etc/rc.d/init.d/bacula-sd
78 uninstall-autostart-dir:
79 @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-dir; then \
80 /sbin/chkconfig --del bacula-dir; \
82 @rm -f $(DESTDIR)/etc/rc.d/init.d/bacula-dir
89 @rm -f bacula-sd bacula-fd bacula-dir
93 @rm -f bacula-sd bacula-fd bacula-dir