aboutsummaryrefslogtreecommitdiffstats
path: root/community/cgmanager/cgproxy.initd
diff options
context:
space:
mode:
Diffstat (limited to 'community/cgmanager/cgproxy.initd')
-rw-r--r--community/cgmanager/cgproxy.initd40
1 files changed, 8 insertions, 32 deletions
diff --git a/community/cgmanager/cgproxy.initd b/community/cgmanager/cgproxy.initd
index 9a834debba..e8e5cc351f 100644
--- a/community/cgmanager/cgproxy.initd
+++ b/community/cgmanager/cgproxy.initd
@@ -1,37 +1,13 @@
#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/cgmanager/files/cgproxy.initd,v 1.2 2015/02/16 11:02:06 hwoarang Exp $
+supervisor=supervise-daemon
-DAEMON=/usr/sbin/cgproxy
-PIDFILE=/run/cgproxy.pid
-NESTED=yes
-OPTIONS=
+name="cmanager system-bus proxy"
+description="D-Bus proxy for cgmanager"
-depend() {
- need cgmanager
-}
-
-start() {
- ebegin "Starting cgproxy server"
- if ! /usr/sbin/cgproxy --check-master; then
- ewarn "cgmanager is not running"
- return 1
- fi
- # cgproxy should only run on container unless on older kernel
- if [ -e /proc/self/ns/pid ] && [ "$NESTED" != "yes" ]; then
- eerror "Too old kernel to support cgroup, please update to >3.8"
- return 1
- fi
-
- start-stop-daemon --start --pidfile ${PIDFILE} --exec ${DAEMON} \
- -- --daemon ${OPTIONS}
+command=/usr/sbin/cgproxy
+command_args="$OPTIONS"
+retry=TERM/45
- eend $?
-}
-
-stop() {
- ebegin "Stopping cgproxy server"
- start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
- eend $?
+depend() {
+ need cgmanager dbus
}