summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/logcheck/files/logcheck.cron')
-rw-r--r--app-admin/logcheck/files/logcheck.cron15
1 files changed, 8 insertions, 7 deletions
diff --git a/app-admin/logcheck/files/logcheck.cron b/app-admin/logcheck/files/logcheck.cron
index 3b3f4fcf62bd..091e1bd895b7 100644
--- a/app-admin/logcheck/files/logcheck.cron
+++ b/app-admin/logcheck/files/logcheck.cron
@@ -1,10 +1,11 @@
-#!/bin/bash
-
-set -e
-
+#!/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
-chown -R logcheck:logcheck /var/lock/logcheck
-
-su -s /bin/bash -c /usr/sbin/logcheck logcheck
+sudo -u logcheck nice -n10 /usr/sbin/logcheck