#!/bin/sh

set -e

if [ -x "/etc/init.d/globus-scheduler-event-generator" ]; then
	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
		invoke-rc.d globus-scheduler-event-generator stop fork || :
	else
		/etc/init.d/globus-scheduler-event-generator stop fork || :
	fi
fi

#DEBHELPER#

if [ "$1" != "remove" -a "$1" != "purge" ]; then
	exit 0
fi

globus-gatekeeper-admin -d jobmanager-fork-seg > /dev/null 2>&1 || :
globus-scheduler-event-generator-admin -d fork > /dev/null 2>&1 || :

exit 0
