#!/bin/sh
set -ex

. /usr/lib/yandex/maps/ecstatic-support/switchlib.sh

if areRequiredDatasetsAvailable ; then
    echo "Restarting"
    sudo -n yacare restart mrc-browser
else
    echo "Some of required datasets are not available. Stopping service."
    sudo -n yacare stop mrc-browser
fi
