#!/bin/sh

set -e

LOGBROKER_CONFIG_SYMLINK="/etc/yandex/statbox-push-client/yandex-passport-vault.yaml"
if [ -f $LOGBROKER_CONFIG_SYMLINK ]; then
    rm -f $LOGBROKER_CONFIG_SYMLINK || /bin/true
fi

if [ -f "/etc/yandex/yasmagent/instances.d/vault-api-xunistater" ]; then
	rm -f "/etc/yandex/yasmagent/instances.d/vault-api-xunistater" || /bin/true
fi

deb-systemd-invoke stop yandex-passport-xunistater@passport-vault-api
systemctl disable yandex-passport-xunistater@passport-vault-api

invoke-rc.d yasmagent restart || true

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

#DEBHELPER#

exit 0
