#!/bin/sh

#DEBHELPER#

set -e

stop() {
  if [ -d /run/systemd ] && [ -f /bin/systemctl ]; then
    /bin/systemctl stop yandex-partner-solomon-agent-conf || true
  elif [ -e /sbin/initctl ]; then
    /sbin/initctl stop yandex-partner-solomon-agent-conf || true
  else
    /usr/sbin/update-rc.d yandex-partner-solomon-agent-conf stop || true
  fi
}

case "$1" in
    remove|upgrade|deconfigure)
        stop
    ;;

    failed-upgrade)
    ;;

    *)
        echo "prerm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

exit 0
