#!/bin/sh

set -e

. "$SETUP_DATA_DIR/common-data"
. "$SETUP_DATA_DIR/common-functions"
. "$SETUP_DATA_DIR/common-config"

if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then

    :

elif [ $STAGE = "setup-stop" ]; then

    info "Stopping gpg agents"

    chroot "$CHROOT_PATH" start-stop-daemon --verbose --exec /usr/bin/gpg-agent --stop || :

fi

