#!/bin/sh

set -e

# Stop the socket on remove so fcgiwrap is not restarted via socket activation
if [ -d /run/systemd/system ] && [ "$1" = remove ] ; then
	systemctl stop fcgiwrap.socket || true
fi

# Automatically added by dh_installinit/11.5.3
if [ -x "/etc/init.d/fcgiwrap" ] && [ "$1" = remove ]; then
	invoke-rc.d fcgiwrap stop || exit 1
fi
# End automatically added section