#!/bin/sh -e

SOLOMON_ROOT="/Berkanavt/solomon"

APP="http-gateway"
SERVICE="yandex-solomon-gateway-http-cloud"

case "$1" in
    configure)
        if [ -x /bin/systemctl -a -f /etc/systemd/system/${SERVICE}.service ] ; then
            if ! /bin/systemctl restart ${SERVICE} ; then
                echo "Cannot restart ${APP} service!"
            fi
        elif [ -x /usr/bin/service -a -f /etc/init/${SERVICE}.conf ] ; then
            if ! /usr/bin/service ${SERVICE} restart ; then
                echo "Cannot restart ${APP} service!"
            fi
        fi
    ;;
esac
