18 lines
456 B
Bash
18 lines
456 B
Bash
|
|
#!/bin/sh
|
||
|
|
#
|
||
|
|
# This script is a wrapper for read-mail.pl to set up the environment.
|
||
|
|
#
|
||
|
|
# Usage: ${HUHU_DIR}/bin/read-mail-wrapper.sh de.alt.test.moderated
|
||
|
|
|
||
|
|
export "LANG=C"
|
||
|
|
export "LC_CTYPE=C"
|
||
|
|
set -o nounset
|
||
|
|
set -o errexit
|
||
|
|
|
||
|
|
export HUHU_DIR="/home/huhu"
|
||
|
|
export PERL5LIB="${PERL5LIB:+$PERL5LIB:}${HUHU_DIR}"
|
||
|
|
USER_DIR=$( echo "$1" | sed 's#[-.]#/#g' )
|
||
|
|
CONFIG="/home/${USER_DIR}/etc/public.conf"
|
||
|
|
|
||
|
|
cat - | "${HUHU_DIR}/bin/read-mail.pl" "-config=${CONFIG}" -stdin
|