Skip to content

Instantly share code, notes, and snippets.

View lr1980's full-sized avatar

Lutz Reinhardt lr1980

  • Munich, Germany
View GitHub Profile
#!/usr/bin/env sh
# shell script template
set -o nounset
set -o errexit
set -o pipefail
# set -o xtrace
# define variables for current script
@lr1980
lr1980 / postfix_log_filter.sh
Created August 30, 2017 17:45
Filter postfix logs /var/logs/maillog and group by their postfix queue id. They are stacked so that a message need to be fit all filter.
#!/bin/sh
# ---------------------------------------------------------------------------
# Copyright 2017, Lutz Reinhardt <postfix_log_filter@lr-mail.net>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
@lr1980
lr1980 / errata_check.sh
Created April 13, 2016 14:45
check OpenBSD Errata and mail new patches
#!/usr/bin/env sh
DIRECTORY=~/errata_check
EMAIL=root
VERSION=$(uname -r)
VERSION_PLAIN=$(echo $VERSION | tr -d "[.]")
if [ -e $DIRECTORY/errata-$VERSION.new ]; then
mv $DIRECTORY/errata-$VERSION.new $DIRECTORY/errata-$VERSION.old