#!/bin/sh

set -e

case "$1" in
  remove|deconfigure)
    if [ -x /etc/init.d/unicorn ]; then
      if [ -x "$(which invoke-rc.d)" ]; then
        invoke-rc.d unicorn stop
      else
        /etc/init.d/unicorn stop
      fi
    fi
  ;;
esac

# Automatically added by dh_installsystemd/13.11.3
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	deb-systemd-invoke stop 'unicorn.service' >/dev/null || true
fi
# End automatically added section


exit 0
