#!/bin/sh

set -e

# Is dev-assistant running?
#if pgrep -x "dev-assistant" || [ -z "$(ps)" ] > /dev/null
#  then continue
#  else
#    echo "
#          ***   Warning !!  ***
#	  For security reasons, vdev only can be removed using the dev-assistant tool.
#          Please, install this package and follow the instructions.
#	 "
#    exit 1
#fi

if ! dpkg-query -f'${db:Status-Status}\n' -W runit-init 2>/dev/null | grep -q ^installed; then
   if test -e /run/vdev/vdevd.pid; then
      invoke-rc.d vdev stop
   fi
fi

#DEBHELPER#
