homeserver updates

This commit is contained in:
Christoph J. Scherr 2024-04-22 12:22:39 +02:00
parent ccf13e8780
commit 68101716a1
1 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,8 @@ mkdir -p /tmp/mail-logger-big
cp /var/log/borg-cron.log /tmp/mail-logger-big cp /var/log/borg-cron.log /tmp/mail-logger-big
cp /var/log/btrfs-raid-status.log /tmp/mail-logger cp /var/log/btrfs-raid-status.log /tmp/mail-logger
cp /var/log/snowboard-download.log /tmp/mail-logger cp /var/log/btrfs-scrub.log /tmp/mail-logger
#cp /var/log/snowboard-download.log /tmp/mail-logger
cat /tmp/mail-logger/* >> /tmp/mail-logger-meta/combined.log cat /tmp/mail-logger/* >> /tmp/mail-logger-meta/combined.log
cat /tmp/mail-logger-big/* >> /tmp/mail-logger-meta/combined.log cat /tmp/mail-logger-big/* >> /tmp/mail-logger-meta/combined.log
@ -21,7 +22,7 @@ If you want to see the complete logs, open the attachment of this E-Mail.\n\n\
tail -vn 300 /tmp/mail-logger/* >> /tmp/mail-logger-meta/mail.txt tail -vn 300 /tmp/mail-logger/* >> /tmp/mail-logger-meta/mail.txt
tail -vn 50 /tmp/mail-logger-big/* >> /tmp/mail-logger-meta/mail.txt tail -vn 50 /tmp/mail-logger-big/* >> /tmp/mail-logger-meta/mail.txt
mail-script "logs@cscherr.de" "logs@cscherr.de" "daily mail report for $(hostname) $(date +"%Y-%m-%d")" /tmp/mail-logger-meta/combined.log < /tmp/mail-logger-meta/mail.txt | sendmail -oi -t mail-script "logs@cscherr.de" "logs@cscherr.de" "weekly mail report for $(hostname) $(date +"%Y-%m-%d")" /tmp/mail-logger-meta/combined.log < /tmp/mail-logger-meta/mail.txt | sendmail -oi -t
rm -rf /tmp/mail-logger* rm -rf /tmp/mail-logger*
rm -rf /tmp/mail-logger-meta rm -rf /tmp/mail-logger-meta