#!/bin/sh

if [ "$(< /etc/yandex/environment.type)" = "production" ]; then
    token_file=/etc/direct-tokens/tvmtool
else
    token_file=/etc/direct-tokens/tvmtool_test
fi
export QLOUD_TVM_TOKEN=$(< "$token_file")
exec chpst -u ppc tvmtool --config /etc/direct-tvmtool/config.json --port 7077
