aboutsummaryrefslogtreecommitdiffstats
path: root/community/roundcubemail/roundcubemail.daily
blob: 5a498d33009566b08326009baa8ff0fb4af17889 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/ash
set -eu
set -o pipefail

# 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