#!/bin/sh -e

case "$1" in
	remove|purge)
		for APP in jaeger-query ; do
			if [ -x /bin/systemctl -a -f /etc/systemd/system/${APP}.service ] ; then
				if ! /bin/systemctl stop ${APP} ; then
					echo "Cannot stop ${APP} service!"
				fi
				if ! /bin/systemctl disable ${APP} ; then
					echo "Cannot disable ${APP} service!"
				fi
			fi
		done
	;;
esac
