summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-09-18 09:34:40 +0200
committerErich Eckner <git@eckner.net>2019-09-18 09:46:14 +0200
commitc6fabbc2f28f6e89a111bc1803f4b48efeb38ac4 (patch)
tree1e17ee7f64e9a05385c82f2d314383aea246a43c
parent24081675cb9c2c473c94935d1670dbaaab05a9e2 (diff)
downloadarchlinuxewe.git.save-c6fabbc2f28f6e89a111bc1803f4b48efeb38ac4.tar.xz
logwatch-systemd neu
-rw-r--r--logwatch-systemd/PKGBUILD102
-rw-r--r--logwatch-systemd/cron.conf10
-rw-r--r--logwatch-systemd/logwatch.service6
-rw-r--r--logwatch-systemd/logwatch.timer7
-rw-r--r--logwatch-systemd/maillog.conf11
-rw-r--r--logwatch-systemd/messages.conf13
-rw-r--r--logwatch-systemd/secure.conf11
7 files changed, 160 insertions, 0 deletions
diff --git a/logwatch-systemd/PKGBUILD b/logwatch-systemd/PKGBUILD
new file mode 100644
index 00000000..054cabe4
--- /dev/null
+++ b/logwatch-systemd/PKGBUILD
@@ -0,0 +1,102 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgname=logwatch-systemd
+_pkgname=${pkgname%-*}
+pkgver=7.5.2
+pkgrel=1
+arch=('any')
+pkgdesc="Logwatch is a customizable log analysis system."
+url="http://www.logwatch.org/"
+depends=('perl')
+optdepends=('perl-date-manip: human readable dates')
+license=('custom')
+backup=(etc/logwatch/conf/logwatch.conf
+ etc/logwatch/conf/ignore.conf
+ etc/logwatch/conf/override.conf)
+provides=("logwatch=$pkgver")
+source=(
+ "https://downloads.sourceforge.net/project/logwatch/logwatch-$pkgver/logwatch-$pkgver.tar.gz"
+ cron.conf
+ maillog.conf
+ messages.conf
+ secure.conf
+ logwatch.timer
+ logwatch.service)
+sha256sums=('5d9c1a6eaf082b880c61895914824e347c6d63ad2a31cfc150f384a3e68ce5fb'
+ '51eb6b6f71fe65f35cc74b49db55e64790c50558309313adbab4945a23bf3d97'
+ 'b1f273b094914702c790301eb045161229d0c2c6c74053dece832d6eeaaaf800'
+ 'ed6b9bdf5be279f5301373b339025cdfc0efe7519936072a0e594c314226b24f'
+ '90ad32fce13269690731ceafd0ed4bb45512740fa97fc7cf66fcb9a3263219b5'
+ 'e8d78befe292fa60aa0385864aef5f9bb4efdfd9c549a8525452a6aa1debfe8c'
+ 'd64d67c0c165db2c63e87066be3dbe3e4d256583a73ea2d37a54750a4fefcb80')
+
+package() {
+ cd "$srcdir"/$_pkgname-$pkgver
+
+ install -m 0755 -d "$pkgdir"/usr/share/logwatch
+ install -m 0755 -d "$pkgdir"/usr/share/logwatch/dist.conf
+ install -m 0755 -d "$pkgdir"/usr/share/logwatch/dist.conf/logfiles
+ install -m 0755 -d "$pkgdir"/usr/share/logwatch/dist.conf/services
+ install -m 0755 -d "$pkgdir"/usr/share/logwatch/default.conf
+ install -m 0755 -d "$pkgdir"/usr/share/logwatch/default.conf/logfiles
+ install -m 0755 -d "$pkgdir"/usr/share/logwatch/default.conf/services
+ install -m 0755 -d "$pkgdir"/usr/share/logwatch/default.conf/html
+ install -m 0755 -d "$pkgdir"/usr/share/logwatch/scripts
+ install -m 0755 -d "$pkgdir"/usr/share/logwatch/scripts/logfiles
+ install -m 0755 -d "$pkgdir"/usr/share/logwatch/scripts/services
+ install -m 0755 -d "$pkgdir"/usr/share/logwatch/scripts/shared
+ install -m 0755 -d "$pkgdir"/usr/share/logwatch/lib
+
+ install -m 0644 README "$pkgdir"/usr/share/logwatch/README
+ install -m 0644 HOWTO-Customize-LogWatch "$pkgdir"/usr/share/logwatch/HOWTO-Customize-LogWatch
+ install -m 0644 conf/*.conf "$pkgdir"/usr/share/logwatch/default.conf
+ install -m 0644 conf/logfiles/* "$pkgdir"/usr/share/logwatch/default.conf/logfiles
+ install -m 0644 conf/services/* "$pkgdir"/usr/share/logwatch/default.conf/services
+ install -m 0644 conf/html/* "$pkgdir"/usr/share/logwatch/default.conf/html
+ install -m 0755 scripts/logwatch.pl "$pkgdir"/usr/share/logwatch/scripts/logwatch.pl
+ for i in scripts/logfiles/* ; do
+ if [ `ls $i | grep -v CVS | wc -l` -ne 0 ] ; then
+ install -m 0755 -d "$pkgdir"/usr/share/logwatch/$i
+ install -m 0644 $i/* "$pkgdir"/usr/share/logwatch/$i
+ fi
+ done
+ install -m 0644 scripts/shared/* "$pkgdir"/usr/share/logwatch/scripts/shared
+ install -m 0644 scripts/services/* "$pkgdir"/usr/share/logwatch/scripts/services
+ install -m 0644 lib/* "$pkgdir"/usr/share/logwatch/lib
+
+ install -m 0755 -d "$pkgdir"/etc/logwatch
+ install -m 0755 -d "$pkgdir"/etc/logwatch/scripts
+ install -m 0755 -d "$pkgdir"/etc/logwatch/conf
+ install -m 0755 -d "$pkgdir"/etc/logwatch/conf/logfiles
+ install -m 0755 -d "$pkgdir"/etc/logwatch/conf/services
+ install -m 0755 -d "$pkgdir"/etc/logwatch/conf/html
+
+ touch "$pkgdir"/etc/logwatch/conf/logwatch.conf
+ touch "$pkgdir"/etc/logwatch/conf/ignore.conf
+ touch "$pkgdir"/etc/logwatch/conf/override.conf
+
+ install -m 0755 -d "$pkgdir"/usr/share/man/man8/
+ install -m 0644 logwatch.8 "$pkgdir"/usr/share/man/man8/
+
+ install -m 0755 -d "$pkgdir"/usr/bin/
+ ln -s /usr/share/logwatch/scripts/logwatch.pl "$pkgdir"/usr/bin/logwatch
+
+ install -m 0755 -d "$pkgdir"/var/cache/logwatch
+
+ # https://bbs.archlinux.org/viewtopic.php?id=227516
+ install -dm0755 "$pkgdir"/var/log
+ touch "$pkgdir"/var/log/emptylog
+ install -Dm0644 "$srcdir"/cron.conf "$pkgdir"/usr/share/logwatch/dist.conf/logfiles/cron.conf
+ install -Dm0644 "$srcdir"/maillog.conf "$pkgdir"/usr/share/logwatch/dist.conf/logfiles/maillog.conf
+ install -Dm0644 "$srcdir"/messages.conf "$pkgdir"/usr/share/logwatch/dist.conf/logfiles/messages.conf
+ install -Dm0644 "$srcdir"/secure.conf "$pkgdir"/usr/share/logwatch/dist.conf/logfiles/secure.conf
+
+ install -m 0755 -d "$pkgdir"/usr/share/licenses/$pkgname/
+ install -m 0644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/
+
+ install -m 0755 -d "$pkgdir"/usr/lib/systemd/system
+ install -m 0644 "$srcdir"/logwatch.timer "$pkgdir"/usr/lib/systemd/system/logwatch.timer
+ install -m 0644 "$srcdir"/logwatch.service "$pkgdir"/usr/lib/systemd/system/logwatch.service
+}
diff --git a/logwatch-systemd/cron.conf b/logwatch-systemd/cron.conf
new file mode 100644
index 00000000..eee46efd
--- /dev/null
+++ b/logwatch-systemd/cron.conf
@@ -0,0 +1,10 @@
+Archive =
+LogFile =
+LogFile = emptylog
+
+# Facilities from /usr/include/sys/syslog.h
+# default syslog directive for cron is: cron.*
+*JournalCtl = "-q --no-pager -o short SYSLOG_FACILITY=9"
+
+# copied from existing cron.conf under default.conf/logfiles directory
+*RemoveService = anacron
diff --git a/logwatch-systemd/logwatch.service b/logwatch-systemd/logwatch.service
new file mode 100644
index 00000000..b1b59beb
--- /dev/null
+++ b/logwatch-systemd/logwatch.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Run logwatch
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/logwatch
diff --git a/logwatch-systemd/logwatch.timer b/logwatch-systemd/logwatch.timer
new file mode 100644
index 00000000..d23c4eaf
--- /dev/null
+++ b/logwatch-systemd/logwatch.timer
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily logwatch run
+
+[Timer]
+OnCalendar=daily
+AccuracySec=1d
+Persistent=true
diff --git a/logwatch-systemd/maillog.conf b/logwatch-systemd/maillog.conf
new file mode 100644
index 00000000..2c6d1211
--- /dev/null
+++ b/logwatch-systemd/maillog.conf
@@ -0,0 +1,11 @@
+Archive =
+LogFile =
+LogFile = emptylog
+
+# Facilities from /usr/include/sys/syslog.h
+# default syslog directive for maillog is: mail.*
+*JournalCtl = "-q --no-pager -o short SYSLOG_FACILITY=2"
+
+# copied from existing maillog.conf under default.conf/logfiles directory
+*ExpandRepeats
+*ApplyStdDate = "%b %d %H:%M:%S "
diff --git a/logwatch-systemd/messages.conf b/logwatch-systemd/messages.conf
new file mode 100644
index 00000000..c74f6063
--- /dev/null
+++ b/logwatch-systemd/messages.conf
@@ -0,0 +1,13 @@
+Archive =
+LogFile =
+LogFile = emptylog
+
+# Facilities from /usr/include/sys/syslog.h
+# default syslog directive for messages is: *.info;mail.none;authpriv.none;cron.none
+# list all facilities except mail, authpriv and cron
+*JournalCtl = "-q --no-pager -o short -p info SYSLOG_FACILITY=0 SYSLOG_FACILITY=1 SYSLOG_FACILITY=3 SYSLOG_FACILITY=4 SYSLOG_FACILITY=5 SYSLOG_FACILITY=6 SYSLOG_FACILITY=7 SYSLOG_FACILITY=8 SYSLOG_FACILITY=11 SYSLOG_FACILITY=16 SYSLOG_FACILITY=17 SYSLOG_FACILITY=18 SYSLOG_FACILITY=19 SYSLOG_FACILITY=20 SYSLOG_FACILITY=21 SYSLOG_FACILITY=22 SYSLOG_FACILITY=23"
+
+# copied from existing message.conf under default.conf/logfiles directory
+*ExpandRepeats
+*RemoveService = talkd,telnetd,inetd,nfsd,/sbin/mingetty,netscreen,NetScreen
+*ApplyStdDate = "%b %d %H:%M:%S "
diff --git a/logwatch-systemd/secure.conf b/logwatch-systemd/secure.conf
new file mode 100644
index 00000000..c742dd5c
--- /dev/null
+++ b/logwatch-systemd/secure.conf
@@ -0,0 +1,11 @@
+Archive =
+LogFile =
+LogFile = emptylog
+
+# Facilities from /usr/include/sys/syslog.h
+# default syslog directive for secure is: authpriv.*
+*JournalCtl = "-q --no-pager -o short SYSLOG_FACILITY=10"
+
+# copied from existing secure.conf under default.conf/logfiles directory
+*ExpandRepeats
+*ApplyStdDate = "%b %d %H:%M:%S "