2020-02-17 10:18:36 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
manager="$(cat "$__object/explorer/service-manager")"
|
|
|
|
|
|
|
|
name=$__object_id
|
|
|
|
action="$(cat "$__object/parameter/action")"
|
|
|
|
|
|
|
|
case "$manager" in
|
|
|
|
systemd)
|
2020-10-08 14:15:20 +00:00
|
|
|
test "$action" = "start" && action="running"
|
|
|
|
test "$action" = "stop" && action="stopped"
|
|
|
|
__systemd_service "$name" --state "$action"
|
2020-02-17 10:18:36 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
# Unknown: handled by `service $NAME $action` in gencode-remote.
|
|
|
|
;;
|
|
|
|
esac
|