#!/bin/sh

set -e

if [ -x "/etc/init.d/etsrvd" ]; then
	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
		invoke-rc.d etsrvd stop || exit $?
	else
		/etc/init.d/etsrvd stop || exit $?
	fi
fi

if [ -x "/etc/init.d/pcscd" ]; then
	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
		invoke-rc.d pcscd stop || exit $?
	else
		/etc/init.d/pcscd stop || exit $?
	fi
fi


if [ -x "/etc/init.d/etokend" ]; then
	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
		invoke-rc.d etokend stop || exit $?
	else
		/etc/init.d/etokend stop || exit $?
	fi
fi
