#!/bin/sh
# preinst script
#
# see: dh_installdeb(1)

set -e

case "$1" in
	install|upgrade)
            if ! nc -vz vault-api.passport.yandex.net 443; then
                echo "problem with connection to vault-api"
                exit 1
            fi
	;;

	abort-upgrade)
	;;

	*)
		echo "preinst called with unknown argument \`$1'" >&2
		exit 1
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
