diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-07-28 20:24:52 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-07-28 20:33:50 +0200 |
commit | 04b3e2ef1ae18a8e9a073c87867169721a11eb87 (patch) | |
tree | 0d993513c070184d78d89381a1ea482e7156912b /community/roundcubemail | |
parent | c607297c5f8486b0bb8d6dc2ffac4f254ca5e8eb (diff) | |
download | aports-04b3e2ef1ae18a8e9a073c87867169721a11eb87.tar.bz2 aports-04b3e2ef1ae18a8e9a073c87867169721a11eb87.tar.xz |
community/roundcubemail: add date prefix to cron log
Diffstat (limited to 'community/roundcubemail')
-rw-r--r-- | community/roundcubemail/APKBUILD | 2 | ||||
-rw-r--r-- | community/roundcubemail/roundcubemail.daily | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/community/roundcubemail/APKBUILD b/community/roundcubemail/APKBUILD index 26ab4ccb04..d91309fa93 100644 --- a/community/roundcubemail/APKBUILD +++ b/community/roundcubemail/APKBUILD @@ -218,4 +218,4 @@ c88d609e94c212215a24f54d2a2cb800d4a382b1044e0c875416bdda6a4e6c0cb896675918e8d24f 0825096ee7e401c5c1687fe784bc859ca30afa754bc1f49ea56b9156fbd05dd5018e68491247f5db484e644e6f67da3ebf5ee2d2324da0e9f031fdde76517f5b nginx.conf acaa76bfbba6117172a02ad11e39f9b55838895104e75180b057f647156c04fd2e44ac695a333f2332691d19bac5ef8afaca1f89ad409800b19f78afbb40aecb roundcubemail.confd b4de4810ac01a2c4b6922371cb949ecf9b57df4f56c3f1bbc3d0ef926b1d85182a3d801cb1af77d28195b587137a2bcbb9a171d932e7eb1b72950a281ca27c2a roundcubemail.logrotate -1eca0dba4ad2bab2d2e849a13fb8752ef6a7f3fd19522d5a32600923d575983dcf873a13a338ddfc100e6d1a50151fd717b926f3a33903920398d69c9c495564 roundcubemail.daily" +1864e3914a2efa846e9fd8f8e6e8338ea4d47da0d07424cc524cbed1a68e65342ef5dccda91688d942c5b25f3b7fad412d6020ed7a681aa9aa31b7657aa780a8 roundcubemail.daily" 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 |