#!/bin/sh
# clawbox-gparted-engine prerm: stop the engine on removal (an upgrade restarts it in postinst).
set -e

UNIT=clawbox-gparted-engine.service

case "$1" in
	remove|deconfigure)
		if [ -d /run/systemd/system ]; then
			systemctl stop "$UNIT" || true
			systemctl disable "$UNIT" || true
		fi
		;;
esac

exit 0
