|
1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #!/bin/sh
-
-
-
-
-
-
- INSPECT_DIR=DATADIR/PACKAGE_NAME
- SNIFFER_EXE=PREFIX/sbin/SNFClient
- SENDMAIL="/usr/sbin/sendmail -G -i"
- MSGFILE=$INSPECT_DIR/`date +%Y%m%d%H%M%S`_$$_$RANDOM.msg
-
-
-
- EX_OK=0
- EX_TEMPFAIL=75
- EX_UNAVAILABLE=69
-
-
-
- trap "rm -f *$MSGFILE" 1 2 3 15
-
-
-
- cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; }
-
-
-
- cat > $MSGFILE || { echo Cannot save mail to file; exit $EX_TEMPFAIL; }
-
-
-
- $SNIFFER_EXE $MSGFILE
- $SENDMAIL "$@" < $MSGFILE
- rm -f $MSGFILE
-
-
-
- exit $EX_OK;
-
-
|