#!/bin/bash

DATE=$(date +%H%M-%d%m%Y)
tar cjpf /tmp/importer-logs-$DATE.tar.bz2 \
    /usr/share/ucs-school-import \
    $(\ls -td /var/log/univention/ucs-school-import/* | head) \
    $(\ls -td /var/log/univention/ucs-school-import.* | head) \
    $(\ls -td /var/lib/ucs-school-import/jobs/*/* | head)
echo "Created log collection for importer. Filename is /tmp/importer-logs-$DATE.tar.bz2"
echo "You might remove this file once uploaded to http://upload.univention.de"

