aboutsummaryrefslogtreecommitdiffstats
path: root/community/roundcubemail/roundcubemail.daily
diff options
context:
space:
mode:
Diffstat (limited to 'community/roundcubemail/roundcubemail.daily')
-rw-r--r--community/roundcubemail/roundcubemail.daily11
1 files changed, 9 insertions, 2 deletions
diff --git a/community/roundcubemail/roundcubemail.daily b/community/roundcubemail/roundcubemail.daily
index da16dad0e7..5a498d3300 100644
--- a/community/roundcubemail/roundcubemail.daily
+++ b/community/roundcubemail/roundcubemail.daily
@@ -1,3 +1,10 @@
-#!/bin/sh
+#!/bin/ash
+set -eu
+set -o pipefail
-su roundcube -s /bin/sh -c '/usr/share/webapps/roundcube/bin/cleandb.php' >>/var/log/roundcube/cron.log 2>&1
+# An awk program to add timestamp prefix to all logged lines.
+AWK_LOG_PREFIX='{ print strftime("%Y-%m-%d %H:%M:%S:"), $0; fflush(); }'
+
+su roundcube -s /bin/sh -c '/usr/share/webapps/roundcube/bin/cleandb.php' 2>&1 \
+ | awk "$AWK_LOG_PREFIX" \
+ | tee -a /var/log/roundcube/cron.log