#!/bin/bash

set -e

roles=/etc/default/ngcp-roles

if [ ! -f $roles ]; then
  echo "error: missing $roles" >&2
  exit 1
fi

# shellcheck disable=SC1090
. $roles

if [ -z "$NGCP_TYPE" ]; then
  echo "error: missing \$NGCP_TYPE" >&2
  exit 2
fi

echo "$NGCP_TYPE"
