# Use the created system user "otrs" for cronjobs.

diff -Naur otrs-5.0.15.orig/var/cron/aaa_base.dist otrs-5.0.15/var/cron/aaa_base.dist
--- otrs-5.0.15.orig/var/cron/aaa_base.dist	2016-12-08 01:13:23.000000000 +0100
+++ otrs-5.0.15/var/cron/aaa_base.dist	2016-12-19 16:24:21.508300518 +0100
@@ -7,4 +7,4 @@
 # --
 
 # Who gets the cron emails?
-MAILTO="root@localhost"
+#MAILTO="root@localhost"
diff -Naur otrs-5.0.15.orig/var/cron/otrs_daemon.dist otrs-5.0.15/var/cron/otrs_daemon.dist
--- otrs-5.0.15.orig/var/cron/otrs_daemon.dist	2016-12-08 01:13:23.000000000 +0100
+++ otrs-5.0.15/var/cron/otrs_daemon.dist	2016-12-19 16:24:21.508300518 +0100
@@ -7,4 +7,5 @@
 # --
 
 # check OTRS daemon status
-*/5 * * * *    $HOME/bin/otrs.Daemon.pl start >> /dev/null
+*/5 * * * * otrs test -x $HOME/bin/otrs.Daemon.pl && $HOME/bin/otrs.Daemon.pl start >> /dev/null
+*/5 * * * * root test -d /run/otrs || (mkdir -p /run/otrs && chown otrs:www-data /run/otrs && chmod 0770 /run/otrs)
