Commit 803ecb50 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

starnge problems

This is a legacy commit from before 2015-05-18.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 2678
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 8a3bc1fe
#!/bin/sh
# this is <observer_bgtwrap.sh>
# ----------------------------------------------------------------------------
# $Id: observer_bgtwrap.sh,v 1.1 2008-11-27 20:47:26 tforb Exp $
# $Id: observer_bgtwrap.sh,v 1.2 2008-11-27 21:20:12 tforb Exp $
#
# Copyright (c) 2008 by Thomas Forbriger (BFO Schiltach)
#
......@@ -13,6 +13,10 @@
# ============================================================================
#
OBS_WRAP_LOGDIR=$HOME/tmp/observer
mkdir -pv $OBS_WRAP_LOGDIR
LOGFILE=$OBS_WRAP_LOGDIR/bgwrapper.log
if test $# -lt 1
then
echo "Usage; $0 wrapper plugin [plugin ...]"
......@@ -31,11 +35,24 @@ then
exit 3
fi
while test -x $1
while test -n $1
do
PLUGIN=$1
$WRAPPER $PLUGIN 2>&1 | mail -s "$(basename $0) $PLUGIN" $USER
if test -x $PLUGIN
then
$WRAPPER $PLUGIN 2>&1 >$LOGFILE
( echo ; \
echo "-------------------------------"; \
echo "output interpreted by observer:"; \
echo "-------------------------------"; \
echo ; \
/bin/cat $LOGFILE | egrep "^(status|message): "; \
cat $LOGFILE ) | mail -s "$(basename $0) $(basename $PLUGIN)" $USER
else
echo $PLUGIN | mail -s "ERROR: plugin $(basename $PLUGIN) not executable" $USER
fi
shift
exit
done
# ----- END OF observer_bgtwrap.sh -----
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment