#!/bin/sh

manager="$(cat "$__object/explorer/service-manager")"

name=$__object_id
action="$(cat "$__object/parameter/action")"

case "$manager" in
	systemd)
		test "$action" = "start" && action="running"
		test "$action" = "stop"  && action="stopped"
		__systemd_service "$name" --state "$action"
	;;
	*)
		# Unknown: handled by `service $NAME $action` in gencode-remote.
	;;
esac
