From 5e8fe1dd21b7af6d8e3005b59ed899bb42f98cbb Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Tue, 5 Apr 2016 04:08:16 +0300 Subject: [PATCH] logcheck.cron: hourly -> daily --- cron.daily/logcheck.cron | 12 ++++++++++++ cron.hourly/logcheck.cron | 10 ++++++++++ 2 files changed, 22 insertions(+) create mode 100755 cron.daily/logcheck.cron create mode 100644 cron.hourly/logcheck.cron diff --git a/cron.daily/logcheck.cron b/cron.daily/logcheck.cron new file mode 100755 index 0000000..74a393f --- /dev/null +++ b/cron.daily/logcheck.cron @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +which logcheck &>/dev/null || exit 0 + +if [ ! -d /var/lock/logcheck ]; then + mkdir -p /var/lock/logcheck +fi +chown -R logcheck:logcheck /var/lock/logcheck + +su -s /bin/bash -c /usr/sbin/logcheck logcheck diff --git a/cron.hourly/logcheck.cron b/cron.hourly/logcheck.cron new file mode 100644 index 0000000..3b3f4fc --- /dev/null +++ b/cron.hourly/logcheck.cron @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e + +if [ ! -d /var/lock/logcheck ]; then + mkdir -p /var/lock/logcheck +fi +chown -R logcheck:logcheck /var/lock/logcheck + +su -s /bin/bash -c /usr/sbin/logcheck logcheck