#!/bin/sh

[ -r /usr/share/artix/cgroups/util-cg.sh ] && . /usr/share/artix/cgroups/util-cg.sh

SV_STATE="$1"

SV_NAME="$2"

SV_CG_SETTINGS="$3"

SV_CG_TIMEOUT_STOPSEC="${4:-90}"

SV_CG_SEND_SIGKILL="${5:-true}"

SV_CG_SEND_SIGHUP="${6:-false}"

[ -r /usr/share/artix/cgroups/util-sv-cg.sh ] && . /usr/share/artix/cgroups/util-sv-cg.sh

if [ -n "${SV_STATE}" ]; then
    sv_cg_"${SV_STATE}"
fi
