#!/bin/bash

tail -F /var/log/apache2/error_log | while read zeile; do
	echo $zeile |grep "Base lambda function for closure not found in" > /dev/null
	if [ $? -eq 0 ] ; then
		echo -n "$(date): restarting Apache2 web server"
		/usr/sbin/rcapache2 restart
	fi
done
