summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-05-04 12:54:43 +0200
committerErich Eckner <git@eckner.net>2016-05-04 12:54:43 +0200
commit5dd9f652296d8207e73b412349d9c59595c2c6cf (patch)
treee30f34a8ad2f9bc353414a767588b5ce9b227fe1
parenteec14ee06c14329cd8eefa6eedb7e7dd0ca3cc9c (diff)
downloadlogwatch-extra-5dd9f652296d8207e73b412349d9c59595c2c6cf.tar.xz
cronfile neu
-rw-r--r--.gitignore1
-rw-r--r--Makefile7
-rwxr-xr-xdoalogwatch.cron.in3
3 files changed, 9 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 67c55f5..5444b6e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
doalogwatch
+doalogwatch.cron
diff --git a/Makefile b/Makefile
index 0b2ff38..636e429 100644
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,7 @@
DESTDIR =
ETCDIR = /etc
+CRONDIR = /etc/cron.daily
BINDIR = /usr/bin
CACHEDIR = /var/cache
MANDIR = /usr/share/man
@@ -29,11 +30,12 @@ WAITDIR = /home/shutdown/.warteauf
VERSION = 0.2
-all: doalogwatch
+all: doalogwatch doalogwatch.cron
%: %.in
sed "s/#VERSION#/$(VERSION)/; \
s@#BINDIR#@$(BINDIR)@; \
+ s@#CRONDIR#@$(CRONDIR)@; \
s@#ETCDIR#@$(ETCDIR)@; \
s@#CACHEDIR#@$(CACHEDIR)@; \
s@#WAITDIR#@$(WAITDIR)@; \
@@ -44,10 +46,11 @@ all: doalogwatch
install: all
install -D -m0755 -t $(DESTDIR)$(BINDIR) doalogwatch
+ install -D -m0755 doalogwatch.cron $(DESTDIR)$(CRONDIR)/doalogwatch
install -d $(DESTDIR)$(CACHEDIR)/logwatch
date +%F > $(DESTDIR)$(CACHEDIR)/logwatch/letzteMeldung
clean:
- rm -f doalogwatch
+ rm -f doalogwatch{,.cron}
# End of file
diff --git a/doalogwatch.cron.in b/doalogwatch.cron.in
new file mode 100755
index 0000000..de4cf26
--- /dev/null
+++ b/doalogwatch.cron.in
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+#BINDIR#/doalogwatch