Mercurial > noffle
view debian/noffle-cronfetch @ 464:d9035d08fe51 noffle
[svn] * src/fetch.c: Log failed posting that we can't mail back to the sender
or where sending fails to <Noffle spool>/failed.posting.
author | bears |
---|---|
date | Wed, 23 Jul 2003 10:32:25 +0100 |
parents | fc3e4fc0a88d |
children |
line wrap: on
line source
#!/bin/sh # $Id: noffle-cronfetch 585 2003-06-25 15:34:53Z godisch $ # # noffle script to fetch articles, run from cron exec > /dev/null 2>&1 LOCKFILE=/var/lock/noffle/noffle-cronfetch.pid NOFFLE=/usr/bin/noffle . /etc/default/noffle [ "$NOFFLE_FETCHMODE" = cron ] || exit 0 if [ -f "$LOCKFILE" ]; then # check if pid still exists if kill -0 `cat "$LOCKFILE"`; then logger -i -p news.info -t noffle-cronfetch -- "previous instance still running" exit 0 fi # false lock logger -i -p news.warning -t noffle-cronfetch -- "removing stale lock $LOCKFILE" rm -f "$LOCKFILE" fi trap 'rm -f "$LOCKFILE"' 0 1 2 15 echo "$$" > "$LOCKFILE" "$NOFFLE" --fetch rm -f "$LOCKFILE" trap '' 0 exit 0