summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Foti <foti.giuseppe@gmail.com>2023-07-23 16:28:44 +0200
committerSam James <sam@gentoo.org>2023-07-27 06:57:52 +0100
commitf93cfe38c170346e48fe1a20b25a92d677cdbd5a (patch)
tree2edb03ffbcc721bd0d7ae9d66c1feddebbb1cf03 /app-admin/logcheck/files
parentacct-user/logcheck: adding systemd use flag; add myself as maintainer (diff)
downloadgentoo-f93cfe38c170346e48fe1a20b25a92d677cdbd5a.tar.gz
gentoo-f93cfe38c170346e48fe1a20b25a92d677cdbd5a.tar.bz2
gentoo-f93cfe38c170346e48fe1a20b25a92d677cdbd5a.zip
app-admin/logcheck: new package, add 1.4.3
Signed-off-by: Giuseppe Foti <foti.giuseppe@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-admin/logcheck/files')
-rw-r--r--app-admin/logcheck/files/logcheck.cron11
-rw-r--r--app-admin/logcheck/files/logcheck.service11
-rw-r--r--app-admin/logcheck/files/logcheck.timer8
-rw-r--r--app-admin/logcheck/files/logcheck.tmpfiles2
4 files changed, 32 insertions, 0 deletions
diff --git a/app-admin/logcheck/files/logcheck.cron b/app-admin/logcheck/files/logcheck.cron
new file mode 100644
index 000000000000..091e1bd895b7
--- /dev/null
+++ b/app-admin/logcheck/files/logcheck.cron
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# To enable sync via cron, execute "sudo -u logcheck touch /etc/logcheck/cron-logcheck-enabled"
+if [[ ! -f /etc/logcheck/cron-logcheck-enabled ]]; then
+ exit
+fi
+if [ ! -d /var/lock/logcheck ]; then
+ mkdir -p /var/lock/logcheck
+ chown logcheck:logcheck /var/lock/logcheck
+fi
+sudo -u logcheck nice -n10 /usr/sbin/logcheck
diff --git a/app-admin/logcheck/files/logcheck.service b/app-admin/logcheck/files/logcheck.service
new file mode 100644
index 000000000000..8d5cd4ac467c
--- /dev/null
+++ b/app-admin/logcheck/files/logcheck.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Mails anomalies in the system logfiles to the administrator
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/logcheck
+SyslogIdentifier=logcheck
+User=logcheck
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-admin/logcheck/files/logcheck.timer b/app-admin/logcheck/files/logcheck.timer
new file mode 100644
index 000000000000..db5fc229a16e
--- /dev/null
+++ b/app-admin/logcheck/files/logcheck.timer
@@ -0,0 +1,8 @@
+[Unit]
+Description=Mails anomalies in the system logfiles to the administrator
+
+[Timer]
+OnCalendar=hourly
+
+[Install]
+WantedBy=timers.target
diff --git a/app-admin/logcheck/files/logcheck.tmpfiles b/app-admin/logcheck/files/logcheck.tmpfiles
new file mode 100644
index 000000000000..7d358900103a
--- /dev/null
+++ b/app-admin/logcheck/files/logcheck.tmpfiles
@@ -0,0 +1,2 @@
+# logcheck lock directory
+d /var/lock/logcheck 0755 logcheck logcheck -