summaryrefslogtreecommitdiff
path: root/merge-hook-logs
blob: 348527a98e4c929ccdf46aaf3a73efcde32467c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/sh

export PATH=/usr/bin

hooks_log=/var/log/resallocserver/hooks.log

find /var/log/resallocserver/hooks -type f -mmin +60 \
    | sort | \
while read -r file; do
    {
        echo "=== $file ==="
        cat "$file"
        echo
        echo
    } >> "$hooks_log"
    rm "$file"
done