]> git.sur5r.net Git - bacula/bacula/commitdiff
Amend logwatch Makefile.in to work with alternative file. Bug #2187 locations
authorAlison Chaiken <alison@she-devel.com>
Sun, 3 Jan 2016 08:09:33 +0000 (00:09 -0800)
committerKern Sibbald <kern@sibbald.com>
Sun, 2 Oct 2016 07:42:40 +0000 (09:42 +0200)
Recent distro releases may place logwatch's configuration files in
different locations.   Improve the Makefile.in by testing for the actual
location of the files.

bacula/scripts/logwatch/Makefile.in

index 1ecb7dd4b3e2680ec1a620a6756786f8964dea24..ae94edbe9852d6ba4ca7f50b5f115682b6a53159 100644 (file)
@@ -6,20 +6,27 @@
 # 08 Jan 2005 D. Scott Barninger
 #
 
-SYSCONFDIR=/etc/log.d
+ifeq ("$(shell test -d /etc/log.d)",0)
+       SYSCONFDIR=/etc/log.d
+       SCRIPTDIR=/etc/log.d
+else
+       SYSCONFDIR=/etc/logwatch
+       SCRIPTDIR=/usr/share/logwatch
+endif
+
 INSTALL=@INSTALL@
 
 all:   install
 
 install:
 
-       $(INSTALL) -m 755 bacula $(DESTDIR)$(SYSCONFDIR)/scripts/services/bacula
-       $(INSTALL) -m 755 applybaculadate $(DESTDIR)$(SYSCONFDIR)/scripts/shared/applybaculadate
+       $(INSTALL) -m 755 bacula $(DESTDIR)$(SCRIPTDIR)/scripts/services/bacula
+       $(INSTALL) -m 755 applybaculadate $(DESTDIR)$(SCRIPTDIR)/scripts/shared/applybaculadate
        $(INSTALL) -m 644 logfile.bacula.conf $(DESTDIR)$(SYSCONFDIR)/conf/logfiles/bacula.conf
        $(INSTALL) -m 644 services.bacula.conf $(DESTDIR)$(SYSCONFDIR)/conf/services/bacula.conf
 
 uninstall:
-       rm -f $(DESTDIR)$(SYSCONFDIR)/scripts/services/bacula
-       rm -f $(DESTDIR)$(SYSCONFDIR)/scripts/shared/applybaculadate
+       rm -f $(DESTDIR)$(SCRIPTDIR)/scripts/services/bacula
+       rm -f $(DESTDIR)$(SCRIPTDIR)/scripts/shared/applybaculadate
        rm -f $(DESTDIR)$(SYSCONFDIR)/conf/logfiles/bacula.conf
        rm -f $(DESTDIR)$(SYSCONFDIR)/conf/services/bacula.conf