123456789101112131415161718192021 |
- #!/bin/sh
- LOCK="/run/mailman-hacky-subscribtion.lock"
- lockfile-check "$LOCK" && exit 0
- trap 'lockfile-remove $LOCK' SIGINT SIGTERM SIGHUP SIGQUIT SIGALRM SIGILL SIGABRT SIGPIPE EXIT
- lockfile-create "$LOCK"
- WORKDIR="$(dirname $(readlink -f "$0"))"
- cd "$WORKDIR"
- ./fetchMail.sh || exit "$?"
- find incoming -type f -exec ./parseMail.sh {} \;
- if [ "$(ls -d incoming/new/* 2>/dev/null)" != "" ]; then
- exit -1
- fi
- exit 0
|