Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
description "cgroup management daemon"
author "Serge Hallyn <>"
# in trusty /sys/fs/cgroup will be mounted for us.
# prior to saucy, we would need to start on mounted
# MOUNTPOINT=/sys, and mount /sys/fs/cgroup ourselves
start on mounted MOUNTPOINT=/sys/fs/cgroup
test -x /sbin/cgmanager || { stop; exit 0; }
# check whether we should start a cgproxy or a cgmanager
dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock --type=method_call /org/linuxcontainers/cgmanager int32:0 > /dev/null 2>&1 || tostart=/sbin/cgmanager
exec $tostart
end script
post-stop script
rm /sys/fs/cgroup/cgmanager/sock || true
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.