-#! /bin/sh
+#! /bin/bash
# Depends: lockfile-progs, ssh
set -e
lockfile-touch "$HOST" &
TOUCH="$!"
trap 'kill "$TOUCH"; lockfile-remove "$HOST"' EXIT ERR HUP INT QUIT TERM
+disown %1
ssh -2 -i "$HOME/.ssh/id-bsmtp-$HOST" -C "$HOST" bsmtp-pull-server > "$HOST"
[ -s "$HOST" ] || exit 0